title: Summing over months with pandas
body: <p>I know there is a simple implementation to do this but I cannot remember the syntax.   Have a simple pandas time series and I want to summarize the data by month.   Specifically I want to add data over months and years to get some summary of it.   Can write it with slicing, but I remember seeing syntax that does it automatically.</p>
  
  <pre><code>import pandas as pd
  df = Series(randn(100), index=pd.date_range('2012-01-01', periods=100))
  </code></pre>
  
  <p>a Multi-indexed Series with Years and sub endexed to months would be first prize.</p>
  
  <p>Partial Answer:</p>
  
  <pre><code>ds.resample('M', how=sum)  # for calendar monthly
  ds.resample('A', how=sum)  # for calendar yearly
  </code></pre>
  
  <p>Any idea how to elegantly get to multindexed by year sums?</p>