pyam icon indicating copy to clipboard operation
pyam copied to clipboard

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

Open gidden opened this issue 1 year ago • 1 comments

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

gidden avatar Aug 12 '22 09:08 gidden

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.

danielhuppmann avatar Aug 12 '22 10:08 danielhuppmann