gsee
gsee copied to clipboard
Compatibility issue with latest Pandas version in gsee.pv.run_model
Description:
When using gsee.pv.run_model with the newest version of Pandas, I encountered the following issues that require fixes:
- 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.
- pv.py, line 243: The
clipmethod usage needs to be adjusted.
- Current:
clip_upper(capacity) - Proposed:
clip(upper=capacity) - Reasoning: The
clip_uppermethod appears to be deprecated in newer Pandas versions. Theclipmethod with theupperargument 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_modelhas working after the proposed changes - Pandas version: 2.1.1
- gsee version: 0.3.1
- Python version: 3.10.13