Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLN: Drop lags parameter from Panel.shift #14041

Merged
merged 1 commit into from
Aug 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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