Closed gidden closed 2 years ago
lgtm but probably @coroa is best to advise given I have no idea about slice...
I like the idea, but I think it would be more intuitive to add index
as a keyword argument to filter()
instead of adding a new method.
The value for the index
argument should accept both a list of tuples or a pandas.MultiIndex.
Collecting our discussions on slack, we thought
IamSlice
which will allow calling it from df.filter()
kwarg
to be named index
at least on df.filter()
to allow for operations like df.filter(index=df.index)
which could return the full dataframeIamSlice
? @coroa and others?Please feel free to add if I missed anything from the discussions.
Argument name for the slice
method is the same as for the filter
method on IamDataFrame
. And i agree it makes sense to call it index
.
Through our discussion on slack, we identified a desire for a feature to allow for filtering unique model-scenario combinations. Here is one proposed implementation:
This utilizes the new
IamSlice
feature, constructing a list of slices of sizeN
whereN
is the number of unique combinations and then usinglogical_or
across all entries.Thoughts @coroa @znicholls @danielhuppmann (and others)?