title: Cumulative Sum Function on Pandas Data Frame
body: <p>I am attempting to capture a "running" cumulative sum given a series of period amounts. </p>
  
  <p>See example:</p>
  
  <p><a href="https://i.stack.imgur.com/35Yhu.png" rel="noreferrer"><img src="https://i.stack.imgur.com/35Yhu.png" alt="enter image description here"></a></p>
  
  <pre><code>df = df[1:4].cumsum() # this doesn't return the desired result
  </code></pre>