title: pandas reindex DataFrame with datetime objects
body: <p>Is it possible to reindex a pandas <code>DataFrame</code> using a column made up of datetime objects?</p>
  
  <p>I have a DataFrame <code>df</code> with the following columns:</p>
  
  <pre><code>Int64Index: 19610 entries, 0 to 19609
  Data columns:
  cntr                  19610  non-null values  #int
  datflt                19610  non-null values  #float
  dtstamp               19610  non-null values  #datetime object
  DOYtimestamp          19610  non-null values  #float
  dtypes: int64(1), float64(2), object(1)
  </code></pre>
  
  <p>I can reindex the <code>df</code> easily along <code>DOYtimestamp</code> with: <code>df.reindex(index=df.dtstamp)</code>
  and <code>DOYtimestamp</code> has the following values:</p>
  
  <pre><code>&gt;&gt;&gt; df['DOYtimestamp'].values
      array([ 153.76252315,  153.76253472,  153.7625463 , ...,  153.98945602,
      153.98946759,  153.98947917])
  </code></pre>
  
  <p>but I'd like to reindex the DataFrame along <code>dtstamp</code> which is made up of datetime objects so that I generate different timestamps directly from the index. The <code>dtstamp</code> column has values which look like:</p>
  
  <pre><code> &gt;&gt;&gt; df['dtstamp'].values
       array([2012-06-02 18:18:02, 2012-06-02 18:18:03, 2012-06-02 18:18:04, ...,
       2012-06-02 23:44:49, 2012-06-02 23:44:50, 2012-06-02 23:44:51], 
       dtype=object)
  </code></pre>
  
  <p>When I try and reindex <code>df</code> along <code>dtstamp</code> I get the following:</p>
  
  <pre><code>&gt;&gt;&gt; df.reindex(index=df.dtstamp)
      TypeError: can't compare datetime.datetime to long
  </code></pre>
  
  <p>I'm just not sure what I need to do get the index to be of a datetime type. Any thoughts?</p>