title: What´s the difference between idxmax() and max() inside a groupby pandas
body: <p>I have a dataframe with data from many players of different teams. What I wanted was to groupby 'team' and only keep the rows with the max value from height.</p>
  
  <p>When I used this code, I just got the 'Team' label and peoples heights:</p>
  
  <p>Code:</p>
  
  <pre><code>df.groupby(['team'], sort=True)['height'].max()
  </code></pre>
  
  <p>Output:</p>
  
  <p>team<br>
  Argentina         199<br>
  Australia         193<br>
  Belgium           199 (...)<br></p>
  
  <p>Then I combined the groupby with loc to get the whole information of the players:</p>
  
  <pre><code>fifa.loc[fifa.groupby('team')['height'].idxmax()]
  </code></pre>
  
  <p>This printed the whole rows, but I don´t understand why do I use <code>idxmax()</code> and not <code>max()</code> at the end of the code.</p>
  
  <p>Can anyone explain me the difference?</p>