IAMconsortium / pyam

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

broken filtering in v0.11.0 with pandas <1.0 #539

Closed gidden closed 3 years ago

gidden commented 3 years ago

After updating to 0.11.0, I observe the following behavior.

Using the sr15 world dataset, and applying the following script

import pyam

print(pyam.__version__)
print(pyam.__file__)

sr1p5 = pyam.IamDataFrame('./iamc15_scenario_data_world_r2.0.xlsx')
variable = 'Emissions|CO2'
print(sr1p5.filter(variable=variable).variables())

Results in an erroneous result

0    AR5 climate diagnostics|Concentration|CO2|FAIR...

This is new as of 0.11, and I confirmed that 0.10 behaves as expected.

To fix this, I needed to update pandas to 1.0+. #531 is our attempt to catch this in the future by explicitly testing minimum dependencies.

gidden commented 3 years ago

@danielhuppmann FYI - this issue is for posterity in case others run into a similar problem. Closing as addressed.