title: Extract rows with maximum values in pandas dataframe
body: <p>We can use <em>.idxmax</em> to get the maximum value of a dataframe­(df). My problem is that I have a df with several columns (more than 10), one of a column has identifiers of same value. I need to extract the identifiers with the maximum value:</p>
  
  <blockquote>
    <p>>df</p>
  
  <pre><code>id  value
  a   0
  b   1
  b   1
  c   0
  c   2
  c   1
  </code></pre>
  </blockquote>
  
  <p>Now, this is what I'd want:</p>
  
  <blockquote>
    <p>>df</p>
  
  <pre><code>id  value
  a   0
  b   1
  c   2
  </code></pre>
  </blockquote>
  
  <p>I am trying to get it by using <code>df.groupy(['id'])</code>, but it is a bit tricky:</p>
  
  <p><code>df.groupby(["id"]).ix[df['value'].idxmax()]</code></p>
  
  <p>Of course, that doesn't work. I fear that I am not on the right path, so I thought I'd ask you guys! Thanks!</p>