Closed
Description
Right now, Series.shift(0)
will just return the series. Shifting for all other periods induces a copy:
In [1]: import pandas as pd
In [2]: a = pd.Series([1, 2])
In [3]: a.shift(1) is a
Out[3]: False
In [4]: a.shift(0) is a
Out[4]: True
Should we defensively copy on 0
as well, for a consistent user experience?
Lines 8084 to 8086 in e669fae