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')