issues: 2021858121
This data as json
id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2021858121 | PR_kwDOAMm_X85g81wJ | 8510 | Grouper object design doc | 2448579 | closed | 0 | 6 | 2023-12-02T04:56:54Z | 2024-03-06T02:27:07Z | 2024-03-06T02:27:04Z | MEMBER | 0 | pydata/xarray/pulls/8510 | xref #8509, #6610 Rendered version here @pydata/xarray I've been poking at this on and off for a year now and finally figured out how to do it cleanly (#8509). I wrote up a design doc for 8509 implements two custom Groupers for you to try out :)```python import xarray as xr from xarray.core.groupers import SeasonGrouper, SeasonResampler ds = 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() ``` All comments are welcome,
1. there are a couple of specific API and design decisions to be made. I'll make some comments pointing these out.
2. I'm also curious about what cc @ilan-gold @ivirshup @aulemahal @tomvothecoder @jbusecke @katiedagon - it would be good to hear what "Groupers" would be useful for your work / projects. I bet you already have examples that fit this proposal |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/8510/reactions", "total_count": 8, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 8, "rocket": 0, "eyes": 0 } |
13221727 | pull |