title: How to get value of a column based on the maximum of another column in case of DataFrame.groupby
body: <p>I have a dataframe which looks like this.</p>
  
  <p><code>id        YearReleased      Artist     count
  168             2015             Muse      1
  169             2015          Rihanna      3
  170             2015     Taylor Swift      2
  171             2016   Jennifer Lopez      1
  172             2016          Rihanna      3
  173             2016       Underworld      1
  174             2017         Coldplay      1
  175             2017       Ed Sheeran      2</code></p>
  
  <p>I want to get the maximum count for each year and then get the corresponding Artist name.</p>
  
  <p>Something like this:</p>
  
  <p>YearReleased  Artist</p>
  
  <p>2015          Rihanna<br>
  2016          Rihanna<br>
  2017       Ed Sheeran</p>
  
  <p>I have tried using a loop to iterate over the rows of the dataframe and create another dictionary with key as year and value as artist. But when I try to convert that dictionary to a dataframe, the keys are mapped to columns instead of rows.</p>
  
  <p>Can somebody guide me to have a better approach to this without having to loop over the dataframe and instead use some inbuilt pandas method to achieve this?</p>