title: get list of unique months from pandas column
body: <p>Let's say I have the following pandas <code>date_range</code>:</p>
  
  <pre><code>rng = pd.date_range('9/1/2017', '12/31/2017')
  </code></pre>
  
  <p>I want to get a list of the unique months. This is what I've come up with so far but there has to be a better way:</p>
  
  <pre><code>df = pd.DataFrame({'date': rng})
  months = df.groupby(pd.Grouper(key='date', freq='M')).agg('sum').index.tolist()
  formatted_m = [i.strftime('%m/%Y') for i in months]
  # ['09/2017', '10/2017', '11/2017', '12/2017']
  </code></pre>
  
  <p>Note the dates will be stored in a DataFrame column or index.</p>