title: Pandas group by cumsum keep columns
body: <p>I have spent a few hours now trying to do a "cumulative group by sum" on a pandas dataframe. I have looked at all the stackoverflow answers and surprisingly none of them can solve my (very elementary) problem:</p>
  
  <p>I have a dataframe:</p>
  
  <p><code>df1
  Out[8]: 
     Name        Date  Amount
  0  Jack  2016-01-31      10
  1  Jack  2016-02-29       5
  2  Jack  2016-02-29       8
  3  Jill  2016-01-31      10
  4  Jill  2016-02-29       5</code></p>
  
  <p>I am trying to</p>
  
  <ol>
  <li>group by ['Name','Date'] and </li>
  <li>cumsum 'Amount'.</li>
  <li>That is it.</li>
  </ol>
  
  <p>So the desired output is:</p>
  
  <p><code>df1
  Out[10]: 
     Name        Date  Cumsum
  0  Jack  2016-01-31      10
  1  Jack  2016-02-29      23
  2  Jill  2016-01-31      10
  3  Jill  2016-02-29      15</code></p>
  
  <p>EDIT: I am simplifying the question. With the current answers I still can't get the correct "running" cumsum. Look closely, I want to see the cumulative sum "10, 23, 10, 15". In words, I want to see, at every consecutive date, the total cumulative sum for a person. NB: If there are two entries on one date for the same person, I want to sum those and then add them to the running cumsum and only then print the sum.</p>