Skip to content

Commit 366691e

Browse files
authored
DEPR: Enforce deprecation of removing axis from all groupby ops (#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
1 parent a3e4391 commit 366691e

18 files changed

+46
-906
lines changed

ci/code_checks.sh

+1
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
179179
pandas.core.groupby.SeriesGroupBy.rolling\
180180
pandas.core.groupby.DataFrameGroupBy.hist\
181181
pandas.core.groupby.DataFrameGroupBy.plot\
182+
pandas.core.groupby.DataFrameGroupBy.corrwith\
182183
pandas.core.groupby.SeriesGroupBy.plot\
183184
pandas.core.window.rolling.Rolling.quantile\
184185
pandas.core.window.expanding.Expanding.quantile # There should be no backslash in the final line, please keep this comment in the last ignored function

doc/source/reference/groupby.rst

-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ Function application
8080
DataFrameGroupBy.describe
8181
DataFrameGroupBy.diff
8282
DataFrameGroupBy.ffill
83-
DataFrameGroupBy.fillna
8483
DataFrameGroupBy.first
8584
DataFrameGroupBy.head
8685
DataFrameGroupBy.idxmax
@@ -131,7 +130,6 @@ Function application
131130
SeriesGroupBy.describe
132131
SeriesGroupBy.diff
133132
SeriesGroupBy.ffill
134-
SeriesGroupBy.fillna
135133
SeriesGroupBy.first
136134
SeriesGroupBy.head
137135
SeriesGroupBy.last

doc/source/user_guide/groupby.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ the number of groups, which is the same as the length of the ``groups`` dictiona
289289
In [1]: gb.<TAB> # noqa: E225, E999
290290
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
291291
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
292-
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
292+
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
293293

294294
.. _groupby.multiindex:
295295

doc/source/whatsnew/v3.0.0.rst

+2
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ Deprecations
101101

102102
Removal of prior version deprecations/changes
103103
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
104+
- Removed :meth:`DataFrameGroupby.fillna` and :meth:`SeriesGroupBy.fillna` (:issue:`55719`)
105+
- Removed ``axis`` argument from all groupby operations (:issue:`50405`)
104106
- Removed deprecated argument ``obj`` in :meth:`.DataFrameGroupBy.get_group` and :meth:`.SeriesGroupBy.get_group` (:issue:`53545`)
105107

106108
.. ---------------------------------------------------------------------------

pandas/core/groupby/base.py

-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ class OutputKey:
7070
"cumsum",
7171
"diff",
7272
"ffill",
73-
"fillna",
7473
"ngroup",
7574
"pct_change",
7675
"rank",

0 commit comments

Comments
 (0)