Skip to content

Commit a9a17b4

Browse files
committed
DEPR: Rename reps to repeats in Series.repeat
xref pandas-devgh-14645.
1 parent 8bb2cc1 commit a9a17b4

File tree

3 files changed

+1
-5
lines changed

3 files changed

+1
-5
lines changed

doc/source/whatsnew/v0.24.0.txt

+1
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@ Removal of prior version deprecations/changes
517517
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
518518

519519
- The ``LongPanel`` and ``WidePanel`` classes have been removed (:issue:`10892`)
520+
- :meth:`Series.repeat` has renamed the ``reps`` argument to ``repeats`` (:issue:`14645`)
520521
- Several private functions were removed from the (non-public) module ``pandas.core.common`` (:issue:`22001`)
521522
- Removal of the previously deprecated module ``pandas.core.datetools`` (:issue:`14105`, :issue:`14094`)
522523
-

pandas/core/series.py

-1
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,6 @@ def _set_values(self, key, value):
10111011
self._data = self._data.setitem(indexer=key, value=value)
10121012
self._maybe_update_cacher()
10131013

1014-
@deprecate_kwarg(old_arg_name='reps', new_arg_name='repeats')
10151014
def repeat(self, repeats, *args, **kwargs):
10161015
"""
10171016
Repeat elements of an Series. Refer to `numpy.ndarray.repeat`

pandas/tests/series/test_analytics.py

-4
Original file line numberDiff line numberDiff line change
@@ -1344,10 +1344,6 @@ def test_repeat(self):
13441344
exp = Series(s.values.repeat(5), index=s.index.values.repeat(5))
13451345
assert_series_equal(reps, exp)
13461346

1347-
with tm.assert_produces_warning(FutureWarning):
1348-
result = s.repeat(reps=5)
1349-
assert_series_equal(result, exp)
1350-
13511347
to_rep = [2, 3, 4]
13521348
reps = s.repeat(to_rep)
13531349
exp = Series(s.values.repeat(to_rep),

0 commit comments

Comments
 (0)