majianyu
1/22/2018 - 7:09 AM

group_sort

table["sort_id"] = table["playtime"].groupby(table["filename"]).rank(ascending=0)#,method="dense")
table.sort_values(by=["filename","sort_id"],inplace=True)