title: Causal resampling: Sum over the last X <time_unit>
body: <p>Say I have the following values:</p>
  
  <pre><code>                                   money_spent
  time                 
  2014-10-06 17:59:40.016000-04:00      1.832128
  2014-10-06 17:59:41.771000-04:00      2.671048
  2014-10-06 17:59:43.001000-04:00      2.019434
  2014-10-06 17:59:44.792000-04:00      1.294051
  2014-10-06 17:59:48.741000-04:00      0.867856
  </code></pre>
  
  <p>I am hoping to measure much money is spent every <code>2</code> seconds. More specifically, for every timestamp in the output, I need to see the money spent <strong>within the last 2 seconds</strong>.</p>
  
  <p>When I do:</p>
  
  <pre><code>df.resample('2S', how='last')
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>                                money_spent
  time               
  2014-10-06 17:59:40-04:00          2.671048
  2014-10-06 17:59:42-04:00          2.019434
  2014-10-06 17:59:44-04:00          1.294051
  2014-10-06 17:59:46-04:00               NaN
  2014-10-06 17:59:48-04:00          0.867856
  </code></pre>
  
  <p>which is <strong>not</strong> what I would expect. To start with, note that the first entry in the resampled df is <strong><code>2.671048</code></strong>, but that is at time <code>17:59:40</code>, even though, according to the original dataframe, no money was spent <strong>yet</strong>.  How is that possible?</p>