title: Getting the corresponding value of columnC while grouping by column A and aggregating by columnB
body: <p>Building on <a href="https://stackoverflow.com/a/42397123/694360">this answer</a>, and given that</p>
  
  <pre><code>&gt;&gt;&gt; df
    columnA  columnB  columnC
  0    cat1        3      400
  1    cat1        2       20
  2    cat1        5     3029
  3    cat2        1      492
  4    cat2        4       30
  5    cat3        2      203
  6    cat3        6      402
  7    cat3        4      391
  
  &gt;&gt;&gt; df.groupby(['columnA']).agg({'columnA':'size','columnB':'min'}).rename(columns={'columnA':'size'})
  
           size  min
  columnA           
  cat1        3    2
  cat2        2    1
  cat3        3    2
  </code></pre>
  
  <p>I want to obtain a DataFrame containing also the value of columnC corresponding to (on the same row of) the displayed minimum value of columnB, that is:</p>
  
  <pre><code>         size  min  columnC
  columnA           
  cat1        3    2       20
  cat2        2    1      492
  cat3        3    2      203
  </code></pre>
  
  <p>Of course this is possible only for those aggregating functions (like min or max) which 'pick' a value from the group rather than 'aggregate' (like sum or average).</p>
  
  <p>Any clue?</p>
  
  <p>Thanks in advance.</p>