Skip to content

Commit 5d6e070

Browse files
committed
Removed mutated from public interface
1 parent 46d2245 commit 5d6e070

File tree

3 files changed

+0
-20
lines changed

3 files changed

+0
-20
lines changed

doc/source/whatsnew/v1.0.0.rst

-2
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,6 @@ Deprecations
215215
value in ``idx`` of ``idx_val`` and a new value of ``val``, ``idx.set_value(arr, idx_val, val)``
216216
is equivalent to ``arr[idx.get_loc(idx_val)] = val``, which should be used instead (:issue:`28621`).
217217
- :func:`is_extension_type` is deprecated, :func:`is_extension_array_dtype` should be used instead (:issue:`29457`)
218-
- :meth:`DataFrame.groupby` and :meth:`Series.groupby` accepted a ``mutated`` parameter, which is actually
219-
an implementation detail. It has been deprecated in the public interface (:issue:`29511`).
220218

221219
.. _whatsnew_1000.prior_deprecations:
222220

pandas/core/generic.py

-11
Original file line numberDiff line numberDiff line change
@@ -7830,7 +7830,6 @@ def groupby(
78307830
group_keys=True,
78317831
squeeze=False,
78327832
observed=False,
7833-
mutated=False,
78347833
):
78357834
"""
78367835
Group DataFrame or Series using a mapper or by a Series of columns.
@@ -7875,10 +7874,6 @@ def groupby(
78757874
If False: show all values for categorical groupers.
78767875
78777876
.. versionadded:: 0.23.0
7878-
mutated : bool, default False
7879-
.. deprecated:: 1.0
7880-
This is an internal parameter and will be removed from the public
7881-
interface in the future
78827877
78837878
Returns
78847879
-------
@@ -7947,11 +7942,6 @@ def groupby(
79477942
raise TypeError("You have to supply one of 'by' and 'level'")
79487943
axis = self._get_axis_number(axis)
79497944

7950-
if mutated is not False:
7951-
warnings.warn(
7952-
"Parameter 'mutated' is deprecated", FutureWarning, stacklevel=2
7953-
)
7954-
79557945
return get_groupby(
79567946
self,
79577947
by=by,
@@ -7962,7 +7952,6 @@ def groupby(
79627952
group_keys=group_keys,
79637953
squeeze=squeeze,
79647954
observed=observed,
7965-
mutated=mutated,
79667955
)
79677956

79687957
def asfreq(self, freq, method=None, how=None, normalize=False, fill_value=None):

pandas/tests/groupby/test_groupby.py

-7
Original file line numberDiff line numberDiff line change
@@ -953,13 +953,6 @@ def test_no_mutate_but_looks_like():
953953
tm.assert_series_equal(result1, result2)
954954

955955

956-
def test_mutated_deprecated():
957-
# GH-29511
958-
df = DataFrame({"key": [1, 1, 1, 2, 2, 2, 3, 3, 3], "value": range(9)})
959-
with tm.assert_produces_warning(FutureWarning, check_stacklevel=True):
960-
df.groupby("key", mutated=True)
961-
962-
963956
def test_groupby_series_indexed_differently():
964957
s1 = Series(
965958
[5.0, -9.0, 4.0, 100.0, -5.0, 55.0, 6.7],

0 commit comments

Comments
 (0)