title: Python Pandas: Creating seasonal DateOffset object?
body: <p>I have a datetime indexed dataframe with an hourly frequency.  I would like to produce a groupby object - grouping by the season.  By season I mean spring is months 3, 4, 5, summer is 6, 7, 8, and so on.  I would like to have a unique group for each year-season combination.  Is there a way to do this with a custom DateOffset?  Would it require a subclass to do it?  Or am I better off just producing a season column and then do: <code>grouper = df.groupby([df['season'], df.index.year])</code>.</p>
  
  <p>Current code is ugly:</p>
  
  <pre><code>def group_season(df):
      """
      This uses the meteorological seasons
      """
      df['month'] = df.index.month
      spring = df['month'].isin([3,4,5])
      spring[spring] = 'spring'
      summer = df['month'].isin([6,7,8])
      summer[summer] = 'summer'
      fall = df['month'].isin([9,10,11])
      fall[fall] = 'fall'
      winter = df['month'].isin([12,1,2])
      winter[winter] = 'winter'
      df['season'] = pd.concat([winter[winter != False], spring[spring != False],\
      fall[fall != False], summer[summer != False]], axis=0)
  
      return df.groupby([df['season'], df.index.year])
  </code></pre>