title: Subtraction between columns and several rows
body: <p>I would like to expose my problem. I have a dataset of this type as you can see below. I would like to add a column to the dataset called <code>balance_required_for_next_bet</code>, is a variable calculated as follows: </p>
  
  <p>(value of the <code>'balance'</code> variable of the row) - (value of the <code>'bet'</code> variable of the next line)</p>
  
  <pre><code>          Date      bet     current loss      current win    balance  
  0   2016-08-20        8                8             0.00      -8.00       
  1   2016-08-21       32               28            18.00     -18.00
  2   2016-08-27       14               14             0.00     -32.00
  </code></pre>
  
  <p>here is an example of the new column to be added to the dataset with the calculation:</p>
  
  <pre><code>     balance required for next bet  (balance - next bet)
  0           -8 - 32 ===&gt; -40       
  1          -18 - 14 ===&gt; -32
  2           -32 - 0 ===&gt; -32
  </code></pre>
  
  <p>Thanks for the help.</p>