Python DataFrameの手動ソートのトリック df.col = df.col.astype("category")df.col.cat.set_categories(sorted_list, inplace=True)df = df.sort_values(["col"]).reset... 2021.06.18 Python