Skip to content

Proof of concept - public Grouper objects - #8509

Closed
dcherian wants to merge 2 commits into
pydata:mainfrom
dcherian:grouper-public
Closed

Proof of concept - public Grouper objects#8509
dcherian wants to merge 2 commits into
pydata:mainfrom
dcherian:grouper-public

Conversation

@dcherian

@dcheriandcherian commented Dec 2, 2023

Copy link
Copy Markdown
Contributor

Not for merging, just proof that it can be done nicely :)

Now builds on #8840
Builds on an older version of #8507

Try it out!

importxarrayasxrfromxarray.core.groupersimportSeasonGrouper, SeasonResamplerds=xr.tutorial.open_dataset("air_temperature")
# custom seasons! ds.air.groupby(time=SeasonGrouper(["JF", "MAM", "JJAS", "OND"])).mean()
ds.air.resample(time=SeasonResampler(["DJF", "MAM", "JJAS", "ON"])).count()

@dcheriandcherian mentioned this pull request Jul 11, 2024
5 tasks
@dcheriandcherian closed this Sep 4, 2024
@dcheriandcherian mentioned this pull request Sep 20, 2024
14 tasks
@dcherian
dcherian deleted the grouper-public branch November 17, 2024 16:15
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@dcherian