Pandas Grouper

PHOTO EMBED

Fri Oct 16 2020 22:26:07 GMT+0000 (Coordinated Universal Time)

Saved by @ianh #python #pandas #grouper

df['column_name'] = pd.to_datetime(df['column_name'])
# new version
df.groupby(pd.Grouper(key='column_name', freq="M")).mean().plot()
content_copyCOPY

https://stackoverflow.com/questions/47015886/pandas-grouper-vs-time-grouper