-
-
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
calculating cumsums on a groupby object #3141
Comments
I wonder if this is as easy as adding |
It looks like But yes, it would be great to add this. |
@tommylees112 Are you up for sending in a PR. It's an easy fix... |
Would love to! Sorry have been away this weekend. Do i just clone the repo write the code and send in a PR in a new branch? (first PR on a public repo!) |
Xarray has a pretty extensive contributor's guide that you might find helpful. In short, the way to contribute changes is to create your own fork of xarray, commit/push some changes, and finally submit a pull request (PR). |
In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity If this issue remains relevant, please comment here or remove the |
* Add cumsum to DatasetGroupBy Fixes #3141 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix * More fix. * Add whats-new * [skip-ci] Add to api.rst * Update xarray/tests/test_groupby.py Co-authored-by: Illviljan <14371165+Illviljan@users.noreply.github.com> * Update xarray/core/groupby.py * Update xarray/core/groupby.py * Update xarray/tests/test_groupby.py Co-authored-by: Vlad Skripniuk <skripniuk.v@yandex.ru> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Maximilian Roos <5635139+max-sixty@users.noreply.github.com> Co-authored-by: Illviljan <14371165+Illviljan@users.noreply.github.com> Co-authored-by: Anderson Banihirwe <axbanihirwe@ualr.edu>
How do I go about calculating cumsums on a groupby object?
I have a
Dataset
that looks as the following:I need to
groupby
year and calculate the cumsum for each year. That way I will have a value for eachmonth
(timestep) and each pixel (lat
-lon
pair).But the cumsum operation doesn't work on a
groupby
objectIs there a work around?
The text was updated successfully, but these errors were encountered: