title: Pandas: rolling mean by time interval
body: <p>I've got a bunch of polling data; I want to compute a Pandas rolling mean to get an estimate for each day based on a three-day window. According to <a href="https://stackoverflow.com/questions/9762193/pandas-rolling-median-for-duplicate-time-series-data">this question</a>, the <code>rolling_*</code> functions compute the window based on a specified number of values, and not a specific datetime range.</p>
  <p>How do I implement this functionality?</p>
  <p>Sample input data:</p>
  <pre><code>polls_subset.tail(20)
  Out[185]: 
              favorable  unfavorable  other
  
  enddate                                  
  2012-10-25       0.48         0.49   0.03
  2012-10-25       0.51         0.48   0.02
  2012-10-27       0.51         0.47   0.02
  2012-10-26       0.56         0.40   0.04
  2012-10-28       0.48         0.49   0.04
  2012-10-28       0.46         0.46   0.09
  2012-10-28       0.48         0.49   0.03
  2012-10-28       0.49         0.48   0.03
  2012-10-30       0.53         0.45   0.02
  2012-11-01       0.49         0.49   0.03
  2012-11-01       0.47         0.47   0.05
  2012-11-01       0.51         0.45   0.04
  2012-11-03       0.49         0.45   0.06
  2012-11-04       0.53         0.39   0.00
  2012-11-04       0.47         0.44   0.08
  2012-11-04       0.49         0.48   0.03
  2012-11-04       0.52         0.46   0.01
  2012-11-04       0.50         0.47   0.03
  2012-11-05       0.51         0.46   0.02
  2012-11-07       0.51         0.41   0.00
  </code></pre>
  <p>Output would have only one row for each date.</p>