-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Enable multi-coord grouping from xarray #9332
Comments
from #6610 (comment) the idea is to eventually support data.groupby({"labels1": xr.UniqueGrouper(), "labels2": xr.UniqueGrouper()}).mean() As far as I remember, multi-dimensional groupby is planned but not supported yet. What we'd need to do is remove the condition here: Lines 10388 to 10393 in ce5130f
|
Great! I would have also supported |
Yes I have struggled to fully generalize it. That said, we could just begin with simply supporting |
Closes pydata#924 Closes pydata#1056 Closes pydata#9332 xref pydata#324
I'm working through some around non-trivial
groupby
from colleagues. In particular, grouping by multiple coordinates seems much harder in xarray than pandas. Flox actually does this really nicely, as per the comment from @dcherian:Originally posted by @dcherian in #9278 (comment)
Would be great if
da.groupby(["labels1", "labels2"]).mean()
worked too — is that just a simple translation to flox from the xarray code? (I can probably do it if so). Or is there something more complex going on?The text was updated successfully, but these errors were encountered: