Skip to content
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

DEPR: Enforce deprecation of groupby(...).grouper #57207

Merged
merged 2 commits into from
Feb 2, 2024

Conversation

rhshadrach
Copy link
Member

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

Enforces #56521

@rhshadrach rhshadrach added this to the 3.0 milestone Feb 2, 2024
msg = "DataFrameGroupBy.grouper is deprecated"
with tm.assert_produces_warning(FutureWarning, match=msg):
grouper = gb.grouper
grouper = gb._grouper
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these _grouper usages common internally? If not, I would be OK just removing these tests

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking as long as the method exists, we should leave the tests - especially if they aren't computationally intensive. That said, it appears we never use __iter__, so could be removed. I'd like to handle in a follow up. I'll open an issue and list out methods we can remove.

@mroeschke mroeschke merged commit 77188e0 into pandas-dev:main Feb 2, 2024
53 checks passed
@mroeschke
Copy link
Member

Thanks @rhshadrach

@rhshadrach rhshadrach deleted the enf_groupby_grouper branch February 2, 2024 23:00
pmhatre1 pushed a commit to pmhatre1/pandas-pmhatre1 that referenced this pull request May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants