title: Get TypeError: Index must be DatetimeIndex when filtering dataframe
body: <p>I want to filter the dataframe by a certain datatime period like the following code.</p>
  
  <pre><code>df2 = df2['Dates'].between_time(pandas.to_datetime('5/13/2015 8:41'), pandas.to_datetime('5/13/2015 8:55'))[['Dates','Category']]
  </code></pre>
  
  <p>but got an error 'TypeError: Index must be DatetimeIndex' 
  This is the dataframe</p>
  
  <p><a href="https://i.stack.imgur.com/bLzbM.png" rel="noreferrer">enter image description here</a></p>
  
  <p>and I tried</p>
  
  <p>df2 = pandas.read_csv(path2,parse_dates=[0])</p>
  
  <p>like one of the response from other post but still got the same error.
  Does anyone know what happen here?</p>