Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility issue with latest Pandas version in gsee.pv.run_model #18

Open
phumthep opened this issue Oct 16, 2024 · 0 comments
Open

Comments

@phumthep
Copy link

Description:

When using gsee.pv.run_model with the newest version of Pandas, I encountered the following issues that require fixes:

  1. trigon.py, line 104: The indexing mechanism needs to be updated to handle the latest Pandas changes.
  • Current: rise_set_times.loc[item.date()]
  • Proposed: rise_set_times.loc[str(item.date())]
  • Reasoning: It seems the .date() method now returns a datetime object that is not directly compatible with Pandas indexing, requiring a conversion to a string representation.
  1. pv.py, line 243: The clip method usage needs to be adjusted.
  • Current: clip_upper(capacity)
  • Proposed: clip(upper=capacity)
  • Reasoning: The clip_upper method appears to be deprecated in newer Pandas versions. The clip method with the upper argument provides the same functionality.
  • These modifications ensure compatibility with the latest Pandas version and prevent errors when using gsee.pv.run_model.

Additional Information:

  • The function gsee.pv.run_model has working after the proposed changes
  • Pandas version: 2.1.1
  • gsee version: 0.3.1
  • Python version: 3.10.13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant