title: Drop duplicates keeping the row with the highest value in another column
body: <pre><code>a = [['John', 'Mary', 'John'], [10,22,50]]
  df1 = pd.DataFrame(a, columns=['Name', 'Count'])
  </code></pre>
  <p>Given a data frame like this I want to compare all similar string values of &quot;Name&quot; against the &quot;Count&quot; value to determine the highest. I'm not sure how to do this in a dataframe in Python.</p>
  <p>Ex: In the case above the Answer would be:</p>
  <ul>
  <li>Name Count</li>
  <li>Mary 22</li>
  <li>John 50</li>
  </ul>
  <p>The lower value John 10 has been dropped (I only want to see the highest value of &quot;Count&quot; based on the same value for &quot;Name&quot;).</p>
  <p>In SQL it would be something like a Select Case query (wherein I select the Case where Name == Name &amp; Count &gt; Count recursively to determine the highest number. Or a For loop for each name, but as I understand loops in DataFrames is a bad idea due to the nature of the object.</p>
  <p>Is there a way to do this with a DF in Python? I could create a new data frame with each variable (one with Only John and then get the highest value (df.value()[:1] or similar. But as I have many hundreds of unique entries that seems like a terrible solution. :D</p>