title: Pandas groupby get row with max in multiple columns
body: <p>Looking to get the row of a group that has the maximum value across multiple columns:</p>
  
  <p><code>pd.DataFrame([{'grouper': 'a', 'col1': 1, 'col2': 3, 'uniq_id': 1}, {'grouper': 'a', 'col1': 2, 'col2': 4, 'uniq_id': 2}, {'grouper': 'a', 'col1': 3, 'col2': 2, 'uniq_id': 3}])</code></p>
  
  <pre><code>   col1  col2 grouper  uniq_id
  0     1     3       a        1
  1     2     4       a        2
  2     3     2       a        3
  </code></pre>
  
  <p>In the above, I'm grouping by the "grouper" column. Within the "a" group, I want to get the row that has the max of <code>col1</code> and <code>col2</code>, in this case, when I group my DataFrame, I want to get the row with <code>uniq_id</code> of <code>2</code> because it has the highest value of col1/col2 with 4, so the outcome would be:</p>
  
  <pre><code>   col1  col2 grouper  uniq_id
  1     2     4       a        2
  </code></pre>
  
  <p>In my actual example, I'm using timestamps, so I actually don't expect ties. But in the case of a tie, I am indifferent to which row I select in the group, so it would just be <code>first</code> of the group in that case.</p>