In [1]:
import pandas as pd
In [2]:
df = pd.DataFrame({'value': range(1, 32, 2)},
index=pd.date_range('2018-01-01', '2018-01-31', freq='2D'))
In [3]:
print(df)
In [4]:
print(df.rolling(5).mean())
In [5]:
print(df.rolling('5D').mean())
In [6]:
print(df.resample('5D').mean())