title: Pandas: Rolling time-weighted moving average with Groupby
body: <p>I have the following dataframe of customer sales history (it's just part of it, the actual dataframe is more than 70k rows):</p>
  
  <pre><code>import pandas as pd
  import datetime as DT
  
  df_test = pd.DataFrame({
      'Cus_ID': ["T313","T348","T313","T348","T313","T348","T329","T329","T348","T313","T329","T348"],
      'Value': [3,2,3,4,5,3,7.25,10.25,4.5,11.75,6.25,6],
      'Date' : [
          DT.datetime(2015,10,18),
          DT.datetime(2015,11,14),
          DT.datetime(2015,11,18),
          DT.datetime(2015,12,13),
          DT.datetime(2015,12,19),
          DT.datetime(2016,1,24),
          DT.datetime(2016,1,31),
          DT.datetime(2016,2,17),
          DT.datetime(2016,3,28),
          DT.datetime(2016,3,31),
          DT.datetime(2016,4,3),            
          DT.datetime(2016,4,16),            
      ]})
  </code></pre>
  
  <p>I would like to add a new column to the dataframe to show the result of time-weighted average of the last 90 days for that customers.</p>
  
  <p>Expected result (column <code>Value_Result</code>):   </p>
  
  <pre><code>     Cus_ID   Date    Value    Value_Result   
  0    T313 2015-10-18   3.00          NaN      (No 90days history)
  1    T348 2015-11-14   2.00          NaN      (No 90days history)
  2    T313 2015-11-18   3.00            3      (3*31)/31
  3    T348 2015-12-13   4.00            2      (2*29)/29
  4    T313 2015-12-19   5.00            3      (3*62+3*31)/(62+31)
  5    T348 2016-01-24   3.00        2.743      (4*42+2*71)/(42+71)
  6    T329 2016-01-31   7.25          NaN      (No 90days history)
  7    T329 2016-02-17  10.25         7.25      (7.25*17)/17
  8    T348 2016-03-28   4.50            3      (3*64)/64
  9    T313 2016-03-31  11.75          NaN      (No 90days history)
  10   T329 2016-04-03   6.25        8.516      (10.25*46+7.25*63)/(46+63)
  11   T348 2016-04-16   6.00        3.279      (4.5*19+3*83)/(19+83)
  </code></pre>
  
  <p>I've tried to use <code>groupby('Cus_ID')</code> and the rolling apply, but I have difficulty writing the function to only consider 90 days backward.</p>
  
  <p>Any input highly appreciated.</p>