Skip to content

How can I get a core dimension in a group? #7636

Discussion options

You must be logged in to vote

You'll need to unstack("group") first which should work OK with your current chunking.

It seems like you're stacking/unstacking to work around the limitation that Xarray only lets you group by a single variable.

Using flox will be better with dask, and more natural: https://flox.readthedocs.io/en/latest/intro.html#grouping-by-multiple-variables

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ricardobarroslourenco
Comment options

Answer selected by ricardobarroslourenco
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants