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

def sort_by(df, column, ascending=True): return df.sort_values(column, ascending=ascending)

Want to kickstart your project?Use the new AI Studio to create your code