Current dataframe looks like :
Group amount uniqueID status
A 100 A32 Success
A 120 B33 Failed
A 80 C44 Failed
Expected Dataframe :
Group amount uniqueID status
A 120 B33 Failed
From the group it should pick the highest amount value and its respective uniqueID & status.
I have tried below code for getting the maximum amount value , how can we fetch its corresponding rows i.e. UniqueID and status
df_sorted = df.groupby(['Group']).agg({'amount': [np.max]})