File tree 3 files changed +2
-16
lines changed
3 files changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -891,6 +891,7 @@ Removal of prior version deprecations/changes
891
891
- ``pd.Categorical`` has dropped setting of the ``ordered`` attribute directly in favor of the ``set_ordered`` method (:issue:`13671`)
892
892
- ``pd.Categorical`` has dropped the ``levels`` attribute in favour of ``categories`` (:issue:`8376`)
893
893
- ``DataFrame.to_sql()`` has dropped the ``mysql`` option for the ``flavor`` parameter (:issue:`13611`)
894
+ - ``Panel.shift()`` has dropped the ``lags`` parameter in favour of ``periods`` (:issue:`14041`)
894
895
- ``pd.Index`` has dropped the ``diff`` method in favour of ``difference`` (:issue:`13669`)
895
896
896
897
- ``Series.to_csv`` has dropped the ``nanRep`` parameter in favor of ``na_rep`` (:issue:`13804`)
Original file line number Diff line number Diff line change 35
35
from pandas .core .ops import _op_descriptions
36
36
from pandas .core .series import Series
37
37
from pandas .tools .util import cartesian_product
38
- from pandas .util .decorators import (deprecate , Appender , deprecate_kwarg )
38
+ from pandas .util .decorators import (deprecate , Appender )
39
39
40
40
_shared_doc_kwargs = dict (
41
41
axes = 'items, major_axis, minor_axis' ,
@@ -1234,7 +1234,6 @@ def count(self, axis='major'):
1234
1234
1235
1235
return self ._wrap_result (result , axis )
1236
1236
1237
- @deprecate_kwarg (old_arg_name = 'lags' , new_arg_name = 'periods' )
1238
1237
def shift (self , periods = 1 , freq = None , axis = 'major' ):
1239
1238
"""
1240
1239
Shift index by desired number of periods with an optional time freq.
Original file line number Diff line number Diff line change @@ -881,20 +881,6 @@ def setUp(self):
881
881
self .panel .minor_axis .name = None
882
882
self .panel .items .name = None
883
883
884
- def test_panel_warnings (self ):
885
- with tm .assert_produces_warning (FutureWarning ):
886
- shifted1 = self .panel .shift (lags = 1 )
887
-
888
- with tm .assert_produces_warning (False ):
889
- shifted2 = self .panel .shift (periods = 1 )
890
-
891
- tm .assert_panel_equal (shifted1 , shifted2 )
892
-
893
- with tm .assert_produces_warning (False ):
894
- shifted3 = self .panel .shift ()
895
-
896
- tm .assert_panel_equal (shifted1 , shifted3 )
897
-
898
884
def test_constructor (self ):
899
885
# with BlockManager
900
886
wp = Panel (self .panel ._data )
You can’t perform that action at this time.
0 commit comments