title: Binning time series with pandas
body: <p>I'm having a time series in form of a <code>DataFrame</code> that I can <code>groupby</code> to a series </p>
  
  <pre><code>pan.groupby(pan.Time).mean()
  </code></pre>
  
  <p>which has just two columns <code>Time</code> and <code>Value</code>: </p>
  
  <pre><code>Time                Value
  2015-04-24 06:38:49 0.023844
  2015-04-24 06:39:19 0.019075
  2015-04-24 06:43:49 0.023844
  2015-04-24 06:44:18 0.019075
  2015-04-24 06:44:48 0.023844
  2015-04-24 06:45:18 0.019075
  2015-04-24 06:47:48 0.023844
  2015-04-24 06:48:18 0.019075
  2015-04-24 06:50:48 0.023844
  2015-04-24 06:51:18 0.019075
  2015-04-24 06:51:48 0.023844
  2015-04-24 06:52:18 0.019075
  2015-04-24 06:52:48 0.023844
  2015-04-24 06:53:48 0.019075
  2015-04-24 06:55:18 0.023844
  2015-04-24 07:00:47 0.019075
  2015-04-24 07:01:17 0.023844
  2015-04-24 07:01:47 0.019075
  </code></pre>
  
  <p>What I'm trying to do is figuring out how I can bin those values into a sampling rate of e.g. 30 seconds and average those bins with more than one observations.</p>
  
  <p>In a last step I'd need to interpolate those values but I'm sure that there's something out there I can use. </p>
  
  <p>However, I just can't figure out how to do the binning and averaging of those values. <code>Time</code> is a <code>datetime.datetime</code> object, not a <code>str</code>.</p>
  
  <p>I've tried different things but nothing works. Exceptions flying around. </p>
  
  <p>Somebody out there who got this?</p>