title: add timedelta data within a group in pandas dataframe
body: <p>I am working on a dataframe in pandas with four columns of <code>user_id</code>, <code>time_stamp1</code>, <code>time_stamp2</code>, and <code>interval</code>.  Time_stamp1 and time_stamp2 are of type datetime64[ns] and interval is of type timedelta64[ns]. </p>
  
  <p>I want to sum up interval values for each user_id in the dataframe and I tried to calculate it in many ways as:</p>
  
  <pre><code>1)df["duration"]=   df.groupby('user_id')['interval'].apply (lambda x: x.sum())
  
  2)df ["duration"]=  df.groupby('user_id').aggregate (np.sum)
  
  3)df ["duration"]=  df.groupby('user_id').agg (np.sum)
  </code></pre>
  
  <p>but none of them work and the value of the <code>duration</code> will be <code>NaT</code> after running the codes.</p>