title: Calculate time difference of a Datetime object and get output as floatvalues?
body: <p>I have a dataframe column of Date and time:</p>
  
  <pre><code>0    2017-06-24 08:37:00
  1    2017-06-24 08:40:00
  2    2017-06-24 08:42:01
  3    2017-06-24 08:44:01
  4    2017-06-24 08:46:00
  5    2017-06-24 08:48:00
  6    2017-06-24 08:50:01
  7    2017-06-24 08:52:01
  8    2017-06-24 08:54:01
  9    2017-06-24 08:56:00
  10   2017-06-24 08:58:01
  11   2017-06-24 09:00:01
  12   2017-06-24 09:04:01
  13   2017-06-24 09:06:01
  Name: Datetime, dtype: datetime64[ns]
  </code></pre>
  
  <p>I want the time difference of two timestamp such as:</p>
  
  <pre><code>2017-06-24 08:40:00 - 2017-06-24 08:37:00 = 3.0
  
  2017-06-24 08:42:01 - 2017-06-24 08:40:00 = 2.1
  </code></pre>
  
  <p>I tried this code:</p>
  
  <pre><code>for z in range(len(df)):
      abc = (df["Datetime"].iat[z+1] - df["Datetime"].iat[z])
  </code></pre>
  
  <p>I am getting the output as this with an error:</p>
  
  <pre><code>0 days 00:03:00
  0 days 00:02:01
  0 days 00:02:00
  0 days 00:01:59
  0 days 00:02:00
  0 days 00:02:01
  0 days 00:02:00
  0 days 00:02:00
  0 days 00:01:59
  0 days 00:02:01
  
  IndexError: index 14 is out of bounds for axis 0 with size 14
  </code></pre>
  
  <p>expected output:</p>
  
  <p>3.0</p>
  
  <p>2.1</p>
  
  <p>2.0</p>
  
  <p>1.59</p>
  
  <p>Any help would be appreciated.</p>