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
monthly_mean.plot(y='A')
Uses index as x-axis by default.