title: Sorting python pandas dataframe with respect to a column of type object
body: <p>I've got a dataframe that looks like the following (subset):</p>
  
  <pre><code>0        2014-01-23 17:01:09
  1000     2014-01-23 17:38:28
  2000     2014-01-23 18:08:28
  3000     2014-01-23 18:33:10
  4000     2014-01-24 14:19:28
  5000     2014-01-24 14:31:04
  6000     2014-01-23 18:34:53
  7000     2014-01-23 17:15:36
  8000     2014-01-23 19:31:45
  9000     2014-01-23 19:23:06
  10000    2014-01-23 17:58:15
  Name: date, dtype: object
  </code></pre>
  
  <p>As you can see the column type of column <code>date</code> is <code>object</code>. So, I'd like to sort this column chronologically. Therefore in my code I call </p>
  
  <pre><code>data = data.sort(['date'])
  </code></pre>
  
  <p>however, the result looks like this:</p>
  
  <pre><code>0        2014-01-23 17:01:09
  1000     2014-01-23 17:38:28
  2000     2014-01-23 18:08:28
  3000     2014-01-23 18:33:10
  4000     2014-01-24 14:19:28
  5000     2014-01-24 14:31:04
  6000     2014-01-23 18:34:53
  7000     2014-01-23 17:15:36
  8000     2014-01-23 19:31:45
  9000     2014-01-23 19:23:06
  10000    2014-01-23 17:58:15
  Name: date, dtype: object
  </code></pre>
  
  <p>So, nothing was sorted. But why does it not work?</p>
  
  <p>UPDATE: I now found the following stuff on the internet:</p>
  
  <pre><code>import dateutil
  data['date'] = data['date'].apply(dateutil.parser.parse)
  print str(data.dtypes)
  </code></pre>
  
  <p>yields:</p>
  
  <pre><code>date        datetime64[ns]
  </code></pre>
  
  <p>However, even now that the type is explicitly set to a datetime object I'm still not able to sort it chronologically. Now, I'm really confused.</p>
  
  <p>UPDATE 2:
  Now I did the following in the code</p>
  
  <pre><code>    data['date'] = pd.to_datetime(data['date'])
      data = data.sort(['date'])
  </code></pre>
  
  <p>However, it still has no effect. No sorting w.r.t. date.</p>