Extract row with maximum value in a group pandas dataframe,df.iloc[df.groupby(['Mt']).apply(lambda x: x['count'].idxmax())]