You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The actual implementation of pandas.Index.shift for a datetime-like index takes a differently named parameter for the number of shifts than the base method.
It should be named periods, which would also be consistent with the pandas.DataFrame.shift or pandas.Series.shift methods. But for a DatetimeIndex it's n.
The actual implementation of
pandas.Index.shift
for a datetime-like index takes a differently named parameter for the number of shifts than the base method.It should be named
periods
, which would also be consistent with thepandas.DataFrame.shift
orpandas.Series.shift
methods. But for a DatetimeIndex it'sn
.See:
https://github.com/pandas-dev/pandas/blob/v0.23.4/pandas/core/indexes/base.py#L2586
vs.
https://github.com/pandas-dev/pandas/blob/v0.23.4/pandas/core/indexes/datetimelike.py#L1021
With a DatetimeIndex, following the documentation leads to a
If this is somehow intended, then it should be stated so in the docstring for
pandas.Index.shift
.pandas version is 0.23.4
The text was updated successfully, but these errors were encountered: