Skip to content

ENH: Support NamedAggs in kwargs in Rolling/Expanding/EWM agg method #60549

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

Merged
merged 7 commits into from
Dec 13, 2024

Conversation

snitish
Copy link
Member

@snitish snitish commented Dec 12, 2024

Currently, Rolling.agg(), Expanding.agg() and ExponentialMovingWindow.agg() methods don't support specifying NamedAggs through **kwargs, while Groupby.agg() does. This change fixes that.

@mroeschke mroeschke added Window rolling, ewma, expanding Groupby labels Dec 13, 2024
@mroeschke mroeschke added this to the 3.0 milestone Dec 13, 2024
@mroeschke mroeschke merged commit 9501650 into pandas-dev:main Dec 13, 2024
50 of 51 checks passed
@mroeschke
Copy link
Member

Thanks @snitish

@snitish snitish deleted the issue28333 branch February 6, 2025 19:46
KevsterAmp pushed a commit to KevsterAmp/pandas that referenced this pull request Mar 12, 2025
…andas-dev#60549)

* ENH: Support NamedAggs in kwargs in Rolling/Expanding/EWM agg method

* Pre-commit fix

* Fix typing

* Fix typing retry

* Fix typing retry 2

* Update pandas/core/window/rolling.py

Co-authored-by: Matthew Roeschke <[email protected]>

* Add type ignore

---------

Co-authored-by: Matthew Roeschke <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Groupby Window rolling, ewma, expanding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected TypeError using pd.NamedAgg dict with pd.rolling
2 participants