IAMconsortium / pyam

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

Improve `IamSlice` feature #658

Open danielhuppmann opened 2 years ago

danielhuppmann commented 2 years ago

As a follow-up to #657 per a suggestion by @coroa:

The next step for the IamSlice would be to refactor the second half of IamDataFrame.filter into a new method (could be called subset for instance) or generic helper and use that from getitem and filter; so that idf[idf.slice(kwargs)] is equivalent to idf.filter(kwargs).

(Currently getitem is dropping meta and does not do the year<->time swapping correctly)