title: Getting maximum counts of a column in grouped dataframe
body: <p>My dataframe <code>df</code> is:</p>
  <pre><code>    Election Year   Votes   Party   Region
    0   2000           50      A       a
    1   2000           100     B       a
    2   2000           26      A       b
    3   2000           180     B       b
    4   2000           300     A       c
    5   2000           46      C       c
    6   2005           149     A       a
    7   2005           46      B       a
    8   2005           312     A       b
    9   2005           23      B       b
    10  2005           16      A       c
    11  2005           35      C       c
  </code></pre>
  <p>I want to get the Party winning maximum region every year. So the desired output is:</p>
  <pre><code> Election Year Party
     2000         B
     2005         A
  </code></pre>
  <p>I tried this code to get the the above output, but it is giving error:</p>
  <pre><code> winner = df.groupby(['Election Year'])['Votes'].max().reset_index()
   winner = winner.groupby('Election Year').first().reset_index()
   winner = winner[['Election Year', 'Party']].to_string(index=False)
   winner
  </code></pre>
  <p>how can I get the desired output?</p>