title: grouping time-series data based on starting and ending date
body: <p>I have time-series data of a yearly sports tournament, with the date when each game was played. I want to group the games by the season(year) they were played in. Each season starts in August and ends the NEXT year in july. </p>
  
  <p>How would I go about grouping the games by season, like -
  season(2016-2017), season(2017-2018), etc..</p>
  
  <p><a href="https://stackoverflow.com/questions/33512115/group-pandas-time-series-data-frame-using-specific-time-intervals">This Answer</a> involving df.resample() may be related, but I'm not sure how I'd go about doing it.</p>
  
  <p>This is what the date column looks like:</p>
  
  <pre><code>DATE
  26/09/09
  04/10/09
  17/10/09
  25/10/09
  31/10/09
    ...   
  29/09/18
  07/10/18
  28/10/18
  03/11/18
  </code></pre>
  
  <p>I want to group by seasons so that I can perform visualization operations over the aggregated data.</p>
  
  <p><strong>UPDATE:</strong> For the time being my solution is to split up the dataframe into groups of 32 as I know each season has 32 games. This is the code I've used:</p>
  
  <pre><code>split_df = np.array_split(df, np.arange(0, len(df),32))
  </code></pre>
  
  <p>But I'd rather prefer something more elegant and more inclusive of time-series data so I'll keep the question open. </p>