diff --git a/doc/source/whatsnew/v0.24.0.txt b/doc/source/whatsnew/v0.24.0.txt index 8c528e9b2e9f0..b37261ea79f21 100644 --- a/doc/source/whatsnew/v0.24.0.txt +++ b/doc/source/whatsnew/v0.24.0.txt @@ -517,6 +517,7 @@ Removal of prior version deprecations/changes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - The ``LongPanel`` and ``WidePanel`` classes have been removed (:issue:`10892`) +- :meth:`Series.repeat` has renamed the ``reps`` argument to ``repeats`` (:issue:`14645`) - Several private functions were removed from the (non-public) module ``pandas.core.common`` (:issue:`22001`) - Removal of the previously deprecated module ``pandas.core.datetools`` (:issue:`14105`, :issue:`14094`) - diff --git a/pandas/core/series.py b/pandas/core/series.py index 2e6270e8739ae..66e572a3c8c59 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1011,7 +1011,6 @@ def _set_values(self, key, value): self._data = self._data.setitem(indexer=key, value=value) self._maybe_update_cacher() - @deprecate_kwarg(old_arg_name='reps', new_arg_name='repeats') def repeat(self, repeats, *args, **kwargs): """ Repeat elements of an Series. Refer to `numpy.ndarray.repeat` diff --git a/pandas/tests/series/test_analytics.py b/pandas/tests/series/test_analytics.py index 0b6470fcd107d..3a8b84cd53087 100644 --- a/pandas/tests/series/test_analytics.py +++ b/pandas/tests/series/test_analytics.py @@ -1344,10 +1344,6 @@ def test_repeat(self): exp = Series(s.values.repeat(5), index=s.index.values.repeat(5)) assert_series_equal(reps, exp) - with tm.assert_produces_warning(FutureWarning): - result = s.repeat(reps=5) - assert_series_equal(result, exp) - to_rep = [2, 3, 4] reps = s.repeat(to_rep) exp = Series(s.values.repeat(to_rep),