Using pandas 0.18.1, I\'d like to take the rolling average of a one-column dataframe. Since version 0.18.0, this is done with rolling() objects. The default for these rolling ob
I think you can use shift:
a = df.rolling(window=3).mean().shift(-2) print (a) A 0 3.666667 1 5.666667 2 11.333333 3 18.333333 4 NaN 5 NaN