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 removing axis from all groupby ops #57109

Merged
merged 9 commits into from
Jan 31, 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.

@rhshadrach rhshadrach added Groupby Deprecate Functionality to remove in pandas labels Jan 28, 2024
@rhshadrach rhshadrach requested a review from mroeschke as a code owner January 30, 2024 22:03
@@ -181,6 +181,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
pandas.core.groupby.SeriesGroupBy.rolling\
pandas.core.groupby.DataFrameGroupBy.hist\
pandas.core.groupby.DataFrameGroupBy.plot\
pandas.core.groupby.DataFrameGroupBy.corrwith\
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 was going to add groupby-specific documentation to this method (rather than just repeating the DataFrame version), but the more I look at it, the more I think we should just deprecate this method. Will make an issue.

Copy link
Member Author

Choose a reason for hiding this comment

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

Opened #57158

# a little trickery for aggregation functions that need an axis
# argument
if "axis" in sig.parameters:
if kwargs.get("axis", None) is None or kwargs.get("axis") is lib.no_default:
kwargs["axis"] = self.axis
kwargs["axis"] = self.axis
Copy link
Member

Choose a reason for hiding this comment

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

Will this be able to be removed once we remove axis from groupby?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep! That's coming next.

@mroeschke mroeschke added this to the 3.0 milestone Jan 31, 2024
@mroeschke mroeschke merged commit 366691e into pandas-dev:main Jan 31, 2024
50 checks passed
@mroeschke
Copy link
Member

Thanks @rhshadrach

@rhshadrach rhshadrach deleted the enf_groupby_axis_1_ops branch January 31, 2024 21:29
pmhatre1 pushed a commit to pmhatre1/pandas-pmhatre1 that referenced this pull request May 7, 2024
…as-dev#57109)

* DEPR: Enforce deprecation of removing axis from all groupby ops

* Add note on fillna and cleanup

* Doc fixups

* Remove corrwith axis=1 test

* Remove corrwith axis=1 test

* Skip corrwith docstring validation
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

Successfully merging this pull request may close these issues.

2 participants