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: Make FutureWarning into DeprecationWarning for groupby.apply #56952

Merged
merged 3 commits into from
Jan 19, 2024

Conversation

rhshadrach
Copy link
Member

@rhshadrach rhshadrach commented Jan 19, 2024

  • 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.

Ref: #54950 (comment)

cc @jorisvandenbossche @phofl

In the event we don't release a 2.3, I am okay waiting to enforce this deprecation until 4.0. The only downside I see of doing so is having users keep the shim include_groups for longer.

@rhshadrach rhshadrach added Groupby Deprecate Functionality to remove in pandas Apply Apply, Aggregate, Transform, Map labels Jan 19, 2024
@lithomas1
Copy link
Member

We should get this in for 2.2 right?

@lithomas1 lithomas1 added this to the 2.2 milestone Jan 19, 2024
Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

Thanks!

@lithomas1 lithomas1 merged commit 24f6139 into pandas-dev:main Jan 19, 2024
50 checks passed
Copy link

lumberbot-app bot commented Jan 19, 2024

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout 2.2.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 24f61394e3b88d296971ac43d5937f6c11afca42
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #56952: DEPR: Make FutureWarning into DeprecationWarning for groupby.apply'
  1. Push to a named branch:
git push YOURFORK 2.2.x:auto-backport-of-pr-56952-on-2.2.x
  1. Create a PR against branch 2.2.x, I would have named this PR:

"Backport PR #56952 on branch 2.2.x (DEPR: Make FutureWarning into DeprecationWarning for groupby.apply)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

@lithomas1
Copy link
Member

thanks @rhshadrach.

lithomas1 pushed a commit to lithomas1/pandas that referenced this pull request Jan 19, 2024
lithomas1 added a commit that referenced this pull request Jan 19, 2024
#56964)

* Backport PR #56952: DEPR: Make FutureWarning into DeprecationWarning for groupby.apply

* Update test_groupby.py

* fix finally?

---------

Co-authored-by: Richard Shadrach <[email protected]>
@rhshadrach rhshadrach deleted the depr_groupby_apply_rollback branch January 19, 2024 21:16
pmhatre1 pushed a commit to pmhatre1/pandas-pmhatre1 that referenced this pull request May 7, 2024
…andas-dev#56952)

* DEPR: Make FutureWarning into DeprecationWarning for groupby.apply

* suppress extra warning when CoW warning mode

---------

Co-authored-by: Joris Van den Bossche <[email protected]>
Co-authored-by: Thomas Li <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Apply Apply, Aggregate, Transform, Map Deprecate Functionality to remove in pandas Groupby
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants