-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
"Reverse" groupby method for split/apply/combine #830
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Note that this new function cannot support passing of coordinates. In fact I feel that the current |
Wooah, I'm so sorry, I didn't realise that So none of this works. Please ignore and I'll revisit when #818 is resolved |
I agree, this would be great! See #324 for more discussion -- I proposed calling this It should be relatively straightforward to implement once finish #818, but it will also require support for multiple groupby arguments, beyond just support for multi-dimensional arguments. |
In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity If this issue remains relevant, please comment here or remove the |
Closing as dupe of #324 (group_over) |
When dealing with high-dimensional data, algorithms often involve operations or aggregation on a particular dimension only, whilst keeping all other dimensions in the dataset.
For example, I might know that I want to average all data along the time axis, and I'm indifferent to the other dimensions present, i.e. I want my algorithm to work whenever there is a time axis, and to be indifferent to the presence/lack of any other dimensions.
Mapping this kind of implementation to xarray is awkward though because I can only use
groupby()
for the split/apply/combine operation.For example, in xarray I have to do this:
instead of this (where
aggregate_over()
is my "reverse" groupby method):For the first example I have to do some extra work: I have to write additional code to fetch all the dimensions in the array, remove the time dimension from that list, and then use that list with groupby, in order to make my code depend on the time dimension only.
It would be really helpful to add a
aggregate_over()
method (name TBD of course!) as an alternative togroupby()
that automates this extra work.The text was updated successfully, but these errors were encountered: