title: Pandas get average time interval within groups
body: <p>I have a DataFrame containing an <code>EffectiveDate</code> column.
  I want to groupby the DataFrame by a Key value and then calculate the average time interval for all the date values in each group for the <code>EffectiveDate</code> column.</p>
  
  <p>For example for the DataFrame:</p>
  
  <pre><code>    EffectiveDate
  1   2015-08-17 07:00:00
  1   2015-08-18 07:00:00
  1   2015-08-19 07:00:00
  2   2015-08-20 07:00:00
  2   2015-08-21 07:00:00
  2   2015-09-16 07:00:00
  2   2015-10-15 07:00:00
  2   2015-11-16 08:00:00
  </code></pre>
  
  <p>I want to groupby the Index and calculate the average interval between the date values in the EffectiveDate column.</p>
  
  <pre><code>15199   2015-08-17 07:00:00
  15214   2015-08-18 07:00:00
  15219   2015-08-19 07:00:00
  15233   2015-08-20 07:00:00
  15254   2015-08-21 07:00:00
  15687   2015-09-16 07:00:00
  199     2015-10-15 07:00:00
  1123    2015-11-16 08:00:00
  Name: EffectiveDate, dtype: datetime64[ns]
  </code></pre>
  
  <p>On a single Series this seems to work fine:</p>
  
  <pre><code>EffectiveDate.diff().astype('timedelta64[s]').mean()
  </code></pre>
  
  <p>However when I am using the same function as a groupby aggregate on a pandas DataFrame:</p>
  
  <pre><code>df.groupby('Key').agg({
      'EffectiveDate': lambda x: x.diff().astype('timedelta64[s]').mean()
  })
  </code></pre>
  
  <p>The results are </p>
  
  <pre><code>                  EffectiveDate                               
  1 1970-01-01 00:00:00.016747425
  2 1970-01-01 00:00:00.017765280
  3 1970-01-01 00:00:00.034776096
  4 1970-01-01 00:00:00.002052450
  5 1970-01-01 00:00:00.018238800
  6 1970-01-01 00:00:00.024005438 
  7 1970-01-01 00:00:00.012330000
  </code></pre>
  
  <p>I would expect an integer field in each column. I am using Pandas <code>0.19.2</code>. </p>