title: Downsample or average data for both the value and time index using Pandas
body: <p>I have a time-indexed pandas DataFrame, with pairs of numbers separated by one or several NaNs:</p>
  
  <pre><code>Time
  1970-01-01 00:00:00.000    0.0186458125
  1970-01-01 00:00:00.066   -0.0165843889
  1970-01-01 00:00:00.068             NaN
  1970-01-01 00:00:00.116             NaN
  1970-01-01 00:00:00.118   -0.0113886875
  1970-01-01 00:00:00.166   -0.0117582778
  1970-01-01 00:00:00.168             NaN
  1970-01-01 00:00:00.216             NaN
  1970-01-01 00:00:00.218   -0.0122501875
  1970-01-01 00:00:00.232   -0.0122501875
  Name: X, dtype: float64
  </code></pre>
  
  <p>Now what I would like to achieve is to compute average of those pairs of numbers and place the result into middle time segment so that the result would look like the following:</p>
  
  <pre><code>Time
  1970-01-01 00:00:00.000             NaN
  1970-01-01 00:00:00.033    0.0010307118
  1970-01-01 00:00:00.066             NaN
  1970-01-01 00:00:00.068             NaN
  1970-01-01 00:00:00.116             NaN
  1970-01-01 00:00:00.118             NaN
  1970-01-01 00:00:00.142   -0.0115734826
  1970-01-01 00:00:00.166             NaN
  1970-01-01 00:00:00.168             NaN
  1970-01-01 00:00:00.216             NaN
  1970-01-01 00:00:00.225   -0.0122501875
  1970-01-01 00:00:00.232             NaN
  </code></pre>
  
  <p>I'm also planning to downsample the time down to fixed frequency of 1/500 of a second, so it's ok if there will be more intermediate NaNs than shown above. Is there a more or less simple Pandas way to do so?</p>
  
  <p>Thanks!</p>