np.random.seed(314)
fr = df.groupby([df.index.year, df.index.month]).sum().unstack(fill_value=0)
fr.columns = pd.to_datetime(fr.columns.droplevel(0), format='%m').strftime('%b'
    )
fr['Year'] = fr.sum(1)
Reshaping Pandas dataframe by months