I have a pandas-Dataframe and use resample() to calculate means (e.g. daily or monthly means). Here is a small example.
resample()
import pandas as pd i
Also,
monthly_mean.plot(x=df.index, y='A')
Try this,
monthly_mean.plot(y='A', use_index=True)
You can use reset_index to turn the index back into a column:
reset_index
monthly_mean.reset_index().plot(x='index', y='A')
monthly_mean.plot(y='A')
Uses index as x-axis by default.