1df.shift(2, axis = 0)
2df.shift(-2, axis = 0)
3df[c1] = df[c2].shift(2, axis = 0)
4df[c1] = df[c2].shift(-2, axis = 0)
1>>> df.shift(periods=3)
2#Shifted down by 3 periods
3#If you want to shift up insert the number of periods as a negative number
4 Col1 Col2 Col3
52020-01-01 NaN NaN NaN
62020-01-02 NaN NaN NaN
72020-01-03 NaN NaN NaN
82020-01-04 10.0 13.0 17.0
92020-01-05 20.0 23.0 27.0
10