IAMconsortium / pyam

Analysis & visualization of energy & climate scenarios
https://pyam-iamc.readthedocs.io/
Apache License 2.0
236 stars 120 forks source link

To access a value by position, use ser.iloc[pos] #880

Closed quant12345 closed 1 month ago

quant12345 commented 1 month ago

Please confirm that this PR has done the following:

Description of PR

This PR removes the warnings: FutureWarning:

Series.__setitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To set a value by position, use ser.iloc[pos] = value

tests to check:

pytest tests/test_feature_aggregate.py::test_aggregate_region_with_negative_weights[None]
pytest tests/test_feature_aggregate.py::test_aggregate_region_with_negative_weights[datetime]
pytest tests/test_io.py::test_load_meta_exclude
codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.0%. Comparing base (ddbb88e) to head (2fd1cc5). Report is 32 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #880 +/- ## ===================================== Coverage 95.0% 95.0% ===================================== Files 64 64 Lines 6134 6216 +82 ===================================== + Hits 5828 5910 +82 Misses 306 306 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.