title: Iterating through a column of pandas dataframe that has time values and return seconds
body: <p>I have a column in a pandas dataframe that looks like this:</p>
  
  <pre><code>Time:
  16:45:15
  16:45:31
  16:45:59
  .
  .
  </code></pre>
  
  <p>I want to convert these times values into seconds and I did the following:</p>
  
  <pre><code>def get_sec(arr):
      h,m,s = arr.split(':')
      return int(h) * 3600 + int(m) * 60 + int(s)
  
  sec_val = []
  for i in range(len(df['Time'])):
      sec_val.append(get_sec(df['Time'][i]))
  </code></pre>
  
  <p>and it gives this error:</p>
  
  <pre><code>'datatime.time' object has no attribute 'split'
  </code></pre>
  
  <p>Although if I used the same code for one string it works, but when I use it in a for loop it gives this error, any idea on how to solve it?</p>
  
  <p>Thanks </p>