title: Python, summarize daily data in dataframe to monthly and quarterly
body: <p>I have already loaded my data into Pandas dataframe. </p>
  
  <p>Example:</p>
  
  <pre><code>Date        Price
  2012/12/02  141.25
  2012/12/05  132.64
  2012/12/06  132.11
  2012/12/21  141.64                                                     
  2012/12/25  143.19  
  2012/12/31  139.66  
  2013/01/05  145.11  
  2013/01/06  145.99  
  2013/01/07  145.97
  2013/01/11  145.11  
  2013/01/12  145.99  
  2013/01/24  145.97
  2013/02/23  145.11  
  2013/03/24  145.99  
  2013/03/28  145.97
  2013/04/28  145.97
  2013/05/24  145.97
  2013/06/23  145.11  
  2013/07/24  145.99  
  2013/08/28  145.97
  2013/09/28  145.97
  </code></pre>
  
  <p>Just two columns, one is data and one is price. </p>
  
  <p>Now how to group or resample the data starts from 2013 to monthly and quarterly df?</p>
  
  <p>Monthly:</p>
  
  <pre><code>Date        Price
  2013/01/01  Monthly total
  2013/02/01  Monthly total
  2013/03/01  Monthly total
  2013/04/01  Monthly total
  2013/05/01  Monthly total
  2013/06/01  Monthly total
  2013/07/01  Monthly total
  2013/08/01  Monthly total  
  2013/09/01  Monthly total
  </code></pre>
  
  <p>Quarterly:</p>
  
  <pre><code>Date        Price
  2013/01/01  Quarterly total
  2013/04/01  Quarterly total
  2013/07/01  Quarterly total
  </code></pre>
  
  <p>Please note that the monthly and quarterly data need to start from first day of month but in the original dataframe the first day of month data is missing, quantity of valid daily data in each month could vary. Also the original dataframe has data from 2012 to 2013, I only need monthly and quarterly data from beginning of 2013.</p>
  
  <p>I tried something like </p>
  
  <pre><code>result1 = df.groupby([lambda x: x.year, lambda x: x.month], axis=1).sum()
  </code></pre>
  
  <p>but does not work. </p>
  
  <p>Thank you!</p>