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)

Questions about programming?Chat with your personal AI assistant