Skip to content

Commit

Permalink
CLN: Drop lags parameter from Panel.shift
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyoung committed Aug 19, 2016
1 parent a01e58f commit 8cf5557
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 16 deletions.
1 change: 1 addition & 0 deletions doc/source/whatsnew/v0.19.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,7 @@ Removal of prior version deprecations/changes
- ``pd.Categorical`` has dropped setting of the ``ordered`` attribute directly in favor of the ``set_ordered`` method (:issue:`13671`)
- ``pd.Categorical`` has dropped the ``levels`` attribute in favour of ``categories`` (:issue:`8376`)
- ``DataFrame.to_sql()`` has dropped the ``mysql`` option for the ``flavor`` parameter (:issue:`13611`)
- ``Panel.shift()`` has dropped the ``lags`` parameter in favour of ``periods`` (:issue:`14041`)
- ``pd.Index`` has dropped the ``diff`` method in favour of ``difference`` (:issue:`13669`)

- ``Series.to_csv`` has dropped the ``nanRep`` parameter in favor of ``na_rep`` (:issue:`13804`)
Expand Down
3 changes: 1 addition & 2 deletions pandas/core/panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
from pandas.core.ops import _op_descriptions
from pandas.core.series import Series
from pandas.tools.util import cartesian_product
from pandas.util.decorators import (deprecate, Appender, deprecate_kwarg)
from pandas.util.decorators import (deprecate, Appender)

_shared_doc_kwargs = dict(
axes='items, major_axis, minor_axis',
Expand Down Expand Up @@ -1234,7 +1234,6 @@ def count(self, axis='major'):

return self._wrap_result(result, axis)

@deprecate_kwarg(old_arg_name='lags', new_arg_name='periods')
def shift(self, periods=1, freq=None, axis='major'):
"""
Shift index by desired number of periods with an optional time freq.
Expand Down
14 changes: 0 additions & 14 deletions pandas/tests/test_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -881,20 +881,6 @@ def setUp(self):
self.panel.minor_axis.name = None
self.panel.items.name = None

def test_panel_warnings(self):
with tm.assert_produces_warning(FutureWarning):
shifted1 = self.panel.shift(lags=1)

with tm.assert_produces_warning(False):
shifted2 = self.panel.shift(periods=1)

tm.assert_panel_equal(shifted1, shifted2)

with tm.assert_produces_warning(False):
shifted3 = self.panel.shift()

tm.assert_panel_equal(shifted1, shifted3)

def test_constructor(self):
# with BlockManager
wp = Panel(self.panel._data)
Expand Down

0 comments on commit 8cf5557

Please sign in to comment.