title: compare a datetime column only to time in pandas
body: <p>I have a df like below</p>
  
  <pre><code>col1, mydate
  1, 25-DEC-2016 09:15:00
  2, 25-DEC-2016 10:14:00
  3, 25-DEC-2016 10:16:00
  4, 25-DEC-2016 10:18:56
  2, 25-DEC-2016 11:14:00
  2, 25-DEC-2016 10:16:00
  
  df.info(): mydate    323809 non-null object
  </code></pre>
  
  <p>I need to this dataframe according to time, like df having time less than 10:15:00, df having time less than 11:15:00</p>
  
  <p>So created my slice intervals using </p>
  
  <pre><code>times=[pd.to_datetime(i) for i in '10:15:00','11:15:00','12:15:00','13:15:00','14:15:00','15:15:00', '15:30:00']
  </code></pre>
  
  <p>Then I convert my mydate type to time
  which takes a lot of time</p>
  
  <pre><code>df['mydate']=df4.mydate.apply(lambda x: pd.to_datetime(x,infer_datetime_format=True).time())
  </code></pre>
  
  <p>The above command I think can be optimised, or there should be a better/faster way.</p>
  
  <p>Then I simply do</p>
  
  <pre><code>for time in times:
    slice = df[df.mydate&lt;time.time()]
  </code></pre>
  
  <p>My intent is only to compare df.mydate time with <code>['10:15:00','11:15:00','12:15:00','13:15:00','14:15:00','15:15:00', '15:30:00']</code> <strong>(but not dates)</strong> and simply subset df</p>
  
  <p>The above way works fine for me but I am looking for a better way.</p>
  
  <p>Additional:
  Interestingly sorting mydate was very fast (even though I did not convert to mydate col to datetime) using </p>
  
  <pre><code>df.sort_values(by='mydate')
  </code></pre>
  
  <p>which lets me think that my way of subsetting should be faster.</p>
  
  <p>mydate col will always be in <code>25-DEC-2016 09:15:00</code> format (Note DEC not Dec) can I use <code>format='%d-%b-%Y %H:%M:%S'</code></p>