📅  最后修改于: 2022-03-11 14:47:24.599000             🧑  作者: Mango
# sorts the dataframe so resulting order of ColumnName matches order in list
df = df.set_index(ColumnName).reindex(list_to_sort_by).reset_index()