Pandas - select rows with best values
<p>I have this dataframe</p>

<pre><code>   col1 col2 col3
0     2    A 1
1     1    A 100
2     3    B 12
3     4    B 2
</code></pre>

<p>I want to select the highest col1 value from all with A, then the one from all with B, etc, i.e. this is the desired output</p>

<pre><code>   col1 col2  col3
0     2    A   1
3     4    B   2
</code></pre>

<p>I know I need some kind of groupby('col2'), but I don't know what to use after that.</p>