-
-
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
Support .groupby(['foo', 'bar'])
as sugar for .groupby(foo=UniqueGrouper(), bar=UniqueGrouper())
#9396
Labels
Comments
@max-sixty are you able to do this? |
I can try to have a look at the weekend (I realize I'm in your debt but generally when I commit to things, I end up not doing them, so I won't commit here. But would like to reciprocate some of your recent work and agree it makes sense for me to take it) |
no pressure! ;) |
dcherian
added a commit
to dcherian/xarray
that referenced
this issue
Aug 30, 2024
dcherian
added a commit
to dcherian/xarray
that referenced
this issue
Aug 30, 2024
hollymandel
pushed a commit
to hollymandel/xarray
that referenced
this issue
Sep 23, 2024
* Group by multiple strings Closes pydata#9396 * Fix typing * some more * fix * cleanup * Update xarray/core/dataarray.py * Update docs * Revert "Update xarray/core/dataarray.py" This reverts commit fafd960. * update docstring * Add docstring examples * Update xarray/core/dataarray.py Co-authored-by: Maximilian Roos <5635139+max-sixty@users.noreply.github.com> * Update xarray/core/dataset.py * fix assert warning / error * fix assert warning / error * Silence RTD warnings --------- Co-authored-by: Maximilian Roos <5635139+max-sixty@users.noreply.github.com> Co-authored-by: Maximilian Roos <m@maxroos.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Once #9372 goes in we will support grouping by multiple variables.
@max-sixty makes a good point re: ergonomics:
Originally posted by @max-sixty in #9372 (comment)
I think this would be great.
da.groupby(foo=UniqueGrouper(), bar=UniqueGrouper())
is a bit too much typing for a very simple expression.The text was updated successfully, but these errors were encountered: