title: computing the mean for python datetime
body: <p>I have a datetime attribute:</p>
  
  <pre><code>d = {
      'DOB': pd.Series([
          datetime.datetime(2014, 7, 9),
          datetime.datetime(2014, 7, 15),
          np.datetime64('NaT')
      ], index=['a', 'b', 'c'])
  }
  df_test = pd.DataFrame(d)
  </code></pre>
  
  <p>I would like to compute the mean for that attribute. Running mean() causes an error: </p>
  
  <blockquote>
    <p>TypeError: reduction operation 'mean' not allowed for this dtype</p>
  </blockquote>
  
  <p>I also tried the solution proposed <a href="https://stackoverflow.com/questions/27907902/datetime-objects-with-pandas-mean-function">elsewhere</a>. It doesn't work as running the function proposed there causes </p>
  
  <blockquote>
    <p>OverflowError: Python int too large to convert to C long</p>
  </blockquote>
  
  <p>What would you propose? The result for the above dataframe should be equivalent to </p>
  
  <pre><code>datetime.datetime(2014, 7, 12).
  </code></pre>