title: Summing up previous 10 rows of a dataframe
body: <p>I'm wondering how to sum up 10 rows of a data frame from any point.</p>
  
  <p>I tried using rolling(10,window =1).sum() but the very first row should sum up the 10 rows below. Similar issue with cumsum()</p>
  
  <p>So if my data frame is just the A column, id like it to output B.</p>
  
  <pre><code>    A   B
  0   10  550
  1   20  650
  2   30  750
  3   40  850
  4   50  950
  5   60  1050
  6   70  1150
  7   80  1250
  8   90  1350
  9   100 1450
  10  110 etc
  11  120 etc
  12  130 etc
  13  140 
  14  150 
  15  160 
  16  170 
  17  180 
  18  190 
  </code></pre>
  
  <p>It would be similar to doing this operation in excel and copying it down</p>
  
  <p>Excel Example:</p>
  
  <p><a href="https://i.stack.imgur.com/aDX0p.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aDX0p.png" alt="Excel Example"></a></p>