title: Remove duplicates by columns A, keeping the row with the highest value in column B
body: <p>I have a dataframe with repeat values in column A.  I want to drop duplicates, keeping the row with the highest value in column B.</p>
  <p>So this:</p>
  <pre><code>A B
  1 10
  1 20
  2 30
  2 40
  3 10
  </code></pre>
  <p>Should turn into this:</p>
  <pre><code>A B
  1 20
  2 40
  3 10
  </code></pre>
  <p>I'm guessing there's probably an easy way to do this—maybe as easy as sorting the DataFrame before dropping duplicates—but I don't know groupby's internal logic well enough to figure it out.  Any suggestions?</p>