I have a sequence of objects datetimeand a series of data that goes through several years. A can create an object Seriesand redo it to group it by month:
df=pd.Series(varv,index=dates)
multiMmean=df.resample("M", how='mean')
print multiMmean
This, however, deduces
2005-10-31 172.4
2005-11-30 69.3
2005-12-31 187.6
2006-01-31 126.4
2006-02-28 187.0
2006-03-31 108.3
...
2014-01-31 94.6
2014-02-28 82.3
2014-03-31 130.1
2014-04-30 59.2
2014-05-31 55.6
2014-06-30 1.2
which is a list of average values ββfor each month in the series. This is not what I want. I want 12 values, one for each month of the year, with an average value for each month for many years. How to get it for multiMmean?
I tried to use resample("M",how='mean')in multiMmeanand list the understanding, but I cannot get it to work. What am I missing?
Thank.
Tomho source
share