Skip to content

DEPR: Enforce numeric_only=False in groupby sum/mean #49829

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

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.

Targeting these two ops first because they're used as an example op in a lot of tests. Hoping the rest of the ops are easier. Note this doesn't check off the corresponding line in the list of deprecations.

@rhshadrach rhshadrach added Groupby Deprecate Functionality to remove in pandas Nuisance Columns Identifying/Dropping nuisance columns in reductions, groupby.add, DataFrame.apply labels Nov 22, 2022
@jbrockmendel
Copy link
Member

is the failed asv time_pivot_table_margins_only_column a false-positive?

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

Generally looks good, just got minor comments / a question

@rhshadrach
Copy link
Member Author

Thanks @jbrockmendel - ASV failure was due to trying to take the mean of a string column; I added it to the columns instead. It now takes 30ms on my machine.

@mroeschke mroeschke added this to the 2.0 milestone Nov 23, 2022
Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

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

LGTM cc @MarcoGorelli merge when ready

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

looks good to me, thanks @rhshadrach !

@MarcoGorelli MarcoGorelli merged commit 3fffb6d into pandas-dev:main Nov 23, 2022
@rhshadrach rhshadrach deleted the enforce_groupby_numreic_only_sum_mean branch November 24, 2022 12:55
mliu08 pushed a commit to mliu08/pandas that referenced this pull request Nov 27, 2022
* DEPR: Enforce numeric_only=False in groupby sum/mean

* cleanup

* Refinements

* whatsnew fixup
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 Nuisance Columns Identifying/Dropping nuisance columns in reductions, groupby.add, DataFrame.apply
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants