title: Python Pandas Dataframe select row by max value in group
body: <p>I have a dataframe which was created via a df.pivot:</p>
  
  <pre><code>type                             start  end
  F_Type         to_date                     
  A              20150908143000    345    316
  B              20150908140300    NaN    480
                 20150908140600    NaN    120
                 20150908143000  10743   8803
  C              20150908140100    NaN   1715
                 20150908140200    NaN   1062
                 20150908141000    NaN    145
                 20150908141500    418    NaN
                 20150908141800    NaN    450
                 20150908142900   1973   1499
                 20150908143000  19522  16659
  D              20150908143000    433     65
  E              20150908143000   7290   7375
  F              20150908143000      0      0
  G              20150908143000   1796    340
  </code></pre>
  
  <p>I would like to filter and return a single row for each 'F_TYPE' only returning the row with the Maximum 'to_date'. I would like to return the following dataframe:</p>
  
  <pre><code>type                             start  end
  F_Type         to_date                     
  A              20150908143000    345    316
  B              20150908143000  10743   8803
  C              20150908143000  19522  16659
  D              20150908143000    433     65
  E              20150908143000   7290   7375
  F              20150908143000      0      0
  G              20150908143000   1796    340
  </code></pre>
  
  <p>Thanks..</p>