title: Index or group by attributes of a DateTimeIndex in Pandas
body: <p>I have a 66-year time series DataFrame of S&amp;P500 monthly change that has a DatetimeIndex. How can i slice the data into columns of annual data.</p>
  
  <p>1) something like stacking (and retaining for labels) DateTimeIndex attributes 'month' and 'year'</p>
  
  <p>2) without a loop</p>
  
  <p>--Essentially I want to slice like</p>
  
  <pre><code>c_test[c_test.index.month==1]
  c_test[c_test.index.month==2]
  c_test[c_test.index.month==3]
  c_test[c_test.index.month==4]
  ....up to 12
  </code></pre>
  
  <p>--into rows labeled by the 'c_test.index.year' label</p>
  
  <p>Is this possible? or do I need to ditch the DateTimeIndex?</p>