title: Convert index to datetime and get the time of Column 2 maximum
body: <p>My dataframe Looks like this:</p>
  
  <pre><code>0    203
  1    250
  2    318
  3    786
  4    321
  5    135
  </code></pre>
  
  <p>I am trying to convert the index column to a datetime and Keep the second column.</p>
  
  <pre><code>pq = pq.index.to_datetime()
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>DatetimeIndex([          '1970-01-01 00:00:00',
                 '1970-01-01 00:00:00.000000001',
                 '1970-01-01 00:00:00.000000002',
                 ...]
  </code></pre>
  
  <p>This just creates a datetime dataframe from the index, doesn't it?</p>
  
  <p>1) How do I 'replace' the index with a datetime while still keeping the rest of the dataframe?</p>
  
  <p>2) What is the equivalent to pd.DataFrame.idxmax() for datetime?</p>
  
  <p>Edit: My office's Pandas Version is 0.18.1 </p>
  
  <p>Edit2: A colleague helped me with this Problem;</p>
  
  <pre><code>date = pd.date_range('2017-01-01', end = '2017-12-31 23:45', freq = '15min')
  pq.index = date
  </code></pre>
  
  <p>To get the time of column 2's Maximum:</p>
  
  <pre><code>pq.idxmax()
  </code></pre>