title: Timestamp to list of month and year using Python
body: <p>I want to get from a list of Timestamps to a list of the month and year.</p>
  
  <p>the output for date_list is</p>
  
  <pre><code>Out[16]: 
  [Timestamp('2014-09-30 00:00:00'),
   Timestamp('2014-10-31 00:00:00'),
   Timestamp('2014-11-30 00:00:00'),
   Timestamp('2014-12-31 00:00:00'),
   Timestamp('2015-01-31 00:00:00'),
   Timestamp('2015-02-28 00:00:00'),
   Timestamp('2015-03-31 00:00:00'),
   Timestamp('2015-04-30 00:00:00'),
   Timestamp('2015-05-31 00:00:00'),
   Timestamp('2015-06-30 00:00:00'),
   Timestamp('2015-07-31 00:00:00'),
   Timestamp('2015-08-31 00:00:00'),
   Timestamp('2015-09-30 00:00:00')]
  </code></pre>
  
  <p>I want it to be [Sep 2014, Oct 2014,...Sep 2015]</p>
  
  <p>If I try to graph it as is, I get <code>TypeError: unsupported operand type(s) for +: 'Timestamp' and 'str'</code> which makes sense. I don't know how to get from Timestamp to the value that the plot will accept. I tried using datetime.datetime(date_list) and got <code>TypeError: an integer is required</code></p>
  
  <p>I also tried <code>pd.to_datetime(formatted.index, format='%b %Y').tolist()</code> but this gives the same timestamp output.</p>
  
  <p>EDIT: More information on the code. </p>
  
  <p>My original dataframe looks like this:</p>
  
  <pre><code>groupname                             A                B     Total
  recvd_dttm                                                      
  2014-09-30                            21               55     76
  2014-10-31                            20               66     86
  2014-11-30                            18               45     63
  2014-12-31                            11               46     57
  2015-01-31                            25                2     27
  2015-02-28                             8                1      9
  2015-03-31                            29                1     30
  2015-04-30                             8               66     74
  2015-05-31                            10               78     88
  2015-06-30                            21               59     80
  2015-07-31                            14               86    100
  2015-08-31                             8               90     98
  2015-09-30                             2                2      4
  </code></pre>
  
  <p>Where I retrieved recv_dttm using an earlier dataframe <code>df['recvd_dttm'] = pd.to_datetime(df['recvd_dttm'])</code></p>
  
  <p>Then I made </p>
  
  <pre><code>total_list = formatted['Total'].values.tolist()
  date_list = formatted.index.tolist()
  </code></pre>