API: Change Panel.shift arg signature to match generic's #6910
Labels
API Design
Deprecate
Functionality to remove in pandas
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
Milestone
This surfaced in the Panel
pct_change
implementation at #6909generic
:def shift(self, periods=1, freq=None, axis=0, **kwds):
Panel
:def shift(self, lags, freq=None, axis='major'):
I had to adjust the call to
shift
ingeneric.pct_change
to not use a kwarg forlag
/period
:Before:
rs = data / data.shift(periods=periods, freq=freq, **kwds) - 1
After:
rs = data.div(data.shift(periods, freq=freq, **kwds)) - 1
We'll need to keep the
.div
change, but we can change back the kwarg once the signatures are aligned.pct_change
back to kwargThe text was updated successfully, but these errors were encountered: