title: Finding the average time of pandas column
body: <p>I have a panda that has the following format:</p>
  
  <pre><code>title   |   decision   |   Time submitted
  Book1   |      1       |   1486507594
  Book1   |      2       |   1485450353
  </code></pre>
  
  <p>What I would like to do is find the average time of submission for books with decision = 1 and then average submission time for books with decision = 2. I have tried using: </p>
  
  <pre><code>df_avg.loc[df_avg['decision'] == 2, 'submitted'].sum()
  df_avg.loc[df_avg['decision'] == 1, 'submitted'].sum()
  </code></pre>
  
  <p>but it does not work for times. I even tried doing the above before and after converting the times to the date and time using datetime. Any ideas on how to do this would be greatly appreciated.</p>