While answering a question Sort a pandas's dataframe series by month name? we meet some weird behavior of groupby.
groupby
df = pd.DataFrame([[\"dec
pandas.DataFrame.groupby has a sort argument that defaults to True. Try
sort
True
total = (df.groupby(df['Month'], sort=False)['Price'].mean())