Skip to content

Commit e4d8b67

Browse files
committed
added whatsnew entryr
1 parent 93ed6fb commit e4d8b67

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

doc/source/whatsnew/v1.2.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ Deprecations
341341
- Deprecate use of strings denoting units with 'M', 'Y' or 'y' in :func:`~pandas.to_timedelta` (:issue:`36666`)
342342
- :class:`Index` methods ``&``, ``|``, and ``^`` behaving as the set operations :meth:`Index.intersection`, :meth:`Index.union`, and :meth:`Index.symmetric_difference`, respectively, are deprecated and in the future will behave as pointwise boolean operations matching :class:`Series` behavior. Use the named set methods instead (:issue:`36758`)
343343
- :meth:`Categorical.is_dtype_equal` and :meth:`CategoricalIndex.is_dtype_equal` are deprecated, will be removed in a future version (:issue:`37545`)
344-
344+
- :meth:`Series.slice_shift` and :meth:`DataFrame.slice_shift` are deprecated, use :meth:`Series.shift` or :meth:`DataFrame.shift` instead (:issue:`37601`)
345345
.. ---------------------------------------------------------------------------
346346
347347

pandas/tests/generic/test_generic.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,10 @@ def test_flags_identity(self, as_frame):
565565
def test_slice_shift_deprecated(self):
566566
# GH 37601
567567
df = pd.DataFrame({'A': [1, 2, 3, 4]})
568+
s = pd.Series([1, 2, 3, 4])
568569

569570
with tm.assert_produces_warning(FutureWarning):
570571
df['A'].slice_shift()
572+
573+
with tm.assert_produces_warning(FutureWarning):
574+
s.slice_shift()

0 commit comments

Comments
 (0)