Skip to content

DEPR: pd.Grouper? #41297

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

Closed
jbrockmendel opened this issue May 4, 2021 · 4 comments
Closed

DEPR: pd.Grouper? #41297

jbrockmendel opened this issue May 4, 2021 · 4 comments
Labels
Deprecate Functionality to remove in pandas Groupby

Comments

@jbrockmendel
Copy link
Member

I guess the point of Grouper is to allow for finer customization of groupby behavior? My hope is that it is a historical artifact and we can now do anything we need without it. Any idea if this is the case?

@jbrockmendel jbrockmendel added Bug Needs Triage Issue that has not been reviewed by a pandas team member Deprecate Functionality to remove in pandas Needs Discussion Requires discussion from core team before further action and removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels May 4, 2021
@jreback
Copy link
Contributor

jreback commented May 4, 2021

the main use of this was to do grouping and resampling simultaneously but we can easily use groupby..resample

so maybe it's possible to deprecate this

@rhshadrach
Copy link
Member

rhshadrach commented May 8, 2021

Searching SO, I'm seeing a lot of questions of the form "How do I do this with pd.Grouper?" and the answer does not use pd.Grouper. I haven't found a question that can't be done without resample.

+1 on deprecating

@mroeschke mroeschke removed the Needs Discussion Requires discussion from core team before further action label Aug 20, 2021
@NowanIlfideme
Copy link

What the .groupby().resample() examples miss are cases when you want to pass "grouping arguments" from one function to another. There isn't a clean way to do that besides pd.Grouper and strings within a list, as far as I'm aware - everything else would need to either specifically check for frequency resampling, or create an auxiliary column of the new periodicity. I'd be glad to be proven wrong. 😃

@jbrockmendel
Copy link
Member Author

@NowanIlfideme thanks for clarifying this for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas Groupby
Projects
None yet
Development

No branches or pull requests

5 participants