import pandas as pd
def sort_df(df):
return df.sort_values(['name', 'score'], ascending=[False, True])
df1 = pd.DataFrame({'name': ['Tom', 'Jack', 'Steve', 'Ricky'], 'score': [85, 90, 87, 91]})
df2 = pd.DataFrame({'name': ['Adam', 'Eve', 'Stark', 'Rogers'], 'score': [88, 92, 95, 97]})
print(sort_df(df1))
print(sort_df(df2))