pandas dataframe group year index by decade,df.groupby(df.index.year).sum().head()