Skip to content

groupby on coordinate (not on dimension) #7009

Answered by benbovy
shcrela asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @shcrela,

You could first convert the coordinates to data variables:

da.reset_coords(["Time", "X", "Z"]).groupby("Y").median()

Then use set_coords() if you want it promoted as coordinates again.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@shcrela
Comment options

@dcherian
Comment options

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