IAMconsortium / pyam

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

`set_meta()` returns `None` instead of `self` #687

Open gidden opened 2 years ago

gidden commented 2 years ago

I was expecting set_meta() to be chainable like our other operations, but it returns None - should we have it return the self instead?

danielhuppmann commented 2 years ago

Having set_meta() chainable would imply that (in default mode) you create a full copy of a potentially very large object (the timeseries data) to make changes on a small object (the meta indicators dataframe). So this could be a big drag on performance without a clear usability improvement: looping over set_meta() is pretty much identical to chaining the operation.