Skip to content

DEPR: Enforce deprecation of removing axis from all groupby ops #57109

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
merged 9 commits into from
Jan 31, 2024
1 change: 1 addition & 0 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

pandas.core.groupby.SeriesGroupBy.plot\
pandas.core.window.rolling.Rolling.quantile\
pandas.core.window.expanding.Expanding.quantile\
Expand Down
2 changes: 0 additions & 2 deletions doc/source/reference/groupby.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ Function application
DataFrameGroupBy.describe
DataFrameGroupBy.diff
DataFrameGroupBy.ffill
DataFrameGroupBy.fillna
DataFrameGroupBy.first
DataFrameGroupBy.head
DataFrameGroupBy.idxmax
Expand Down Expand Up @@ -131,7 +130,6 @@ Function application
SeriesGroupBy.describe
SeriesGroupBy.diff
SeriesGroupBy.ffill
SeriesGroupBy.fillna
SeriesGroupBy.first
SeriesGroupBy.head
SeriesGroupBy.last
Expand Down
2 changes: 1 addition & 1 deletion doc/source/user_guide/groupby.rst
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ the number of groups, which is the same as the length of the ``groups`` dictiona
In [1]: gb.<TAB> # noqa: E225, E999
gb.agg gb.boxplot gb.cummin gb.describe gb.filter gb.get_group gb.height gb.last gb.median gb.ngroups gb.plot gb.rank gb.std gb.transform
gb.aggregate gb.count gb.cumprod gb.dtype gb.first gb.groups gb.hist gb.max gb.min gb.nth gb.prod gb.resample gb.sum gb.var
gb.apply gb.cummax gb.cumsum gb.fillna gb.gender gb.head gb.indices gb.mean gb.name gb.ohlc gb.quantile gb.size gb.tail gb.weight
gb.apply gb.cummax gb.cumsum gb.gender gb.head gb.indices gb.mean gb.name gb.ohlc gb.quantile gb.size gb.tail gb.weight

.. _groupby.multiindex:

Expand Down
8 changes: 8 additions & 0 deletions doc/source/whatsnew/v3.0.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ Deprecations
- Deprecated :meth:`Timestamp.utcnow`, use ``Timestamp.now("UTC")`` instead (:issue:`56680`)
-

.. ---------------------------------------------------------------------------
.. _whatsnew_300.prior_deprecations:

Removal of prior version deprecations/changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Removed :meth:`DataFrameGroupby.fillna` and :meth:`SeriesGroupBy.fillna` (:issue:`55719`)
- Removed ``axis`` argument from all groupby operations (:issue:`50405`)

.. ---------------------------------------------------------------------------
.. _whatsnew_300.performance:

Expand Down
1 change: 0 additions & 1 deletion pandas/core/groupby/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ class OutputKey:
"cumsum",
"diff",
"ffill",
"fillna",
"ngroup",
"pct_change",
"rank",
Expand Down
Loading