title: Select rows with highest value from groupby
body: <p>I have a dataframe that contains some information about users. There is a column for user, column for type, and column for count, like this:</p>
  
  <pre><code>name         type     count
  robert       x        123
  robert       y        456
  robert       z        5123
  charlie      x        442123
  charlie      y        0 
  charlie      z        42
  </code></pre>
  
  <p>I'm trying to figure out which type has the highest count per name, so for this case, I would want to select this:</p>
  
  <pre><code>name         type    count
  robert       z       5123
  charlie      x       442123
  </code></pre>
  
  <p>I know I can do something like this to get the max count per name, but I'm not sure how I can include the "type" column, which is actually the most important </p>
  
  <pre><code>df.sort_values('count', ascending=False).drop_duplicates('name').sort_index()
  </code></pre>
  
  <p>Any help is greatly appreciated!</p>