title: how to calculate the differences of a list of pandas timestamps?
body: <p>When I have a pandas timestamps like so:</p>
  
  <pre><code>list(uni_index)
  
  Out[95]:
  
  [&lt;Timestamp: 2011-04-16 00:00:01&gt;,
   &lt;Timestamp: 2011-04-16 00:00:21&gt;,
   &lt;Timestamp: 2011-04-16 00:00:46&gt;,
   &lt;Timestamp: 2011-04-16 00:01:08&gt;,
   &lt;Timestamp: 2011-04-16 00:01:33&gt;,
   &lt;Timestamp: 2011-04-16 00:01:55&gt;,
   ...
  </code></pre>
  
  <p>How would I get the differences of these time stamps?</p>
  
  <p>I found a brute for it like so:</p>
  
  <pre><code>np.diff(uni_index.values.astype(int))
  </code></pre>
  
  <p>but it would be nice if it's possible to get back an answer in datetime.timedeltas directly from pandas. Maybe it is, I just haven't found it yet?</p>