title: Aggregation and grouped index with pandas
body: <p>I have a dataframe like this:</p>
  
  <pre><code>User ID Year    Amount
  A       2009    5
  A       2010    6
  A       2009    6
  A       2010    1
  B       2010    1
  B       2009    1
  B       2010    2
  B       2010    5
  </code></pre>
  
  <p>And I want to sum of the user's amount for each year.. And want to result like this:</p>
  
  <pre><code>    Sum of amount   
  User    2009    2010
  
    A        11   7
    B        1    8
  </code></pre>
  
  <p>I can handle this for only a year. Like this:</p>
  
  <pre><code>newdf= df.groupby('User ID')['Amount'].sum().reset_index()
  </code></pre>