Generation

generate functionWed, 01 Feb 2023

There is a Pandas function: df[['performer', 'time_on_chart']].groupby('performer').agg({'min', 'max'}) Sort it by 'max' column

df[['performer', 'time_on_chart']].groupby('performer').agg({'min', 'max'}).sort_values('max', ascending = False)

Questions about programming?Chat with your personal AI assistant