# Pandas: Reorder DataFrame rows based on Index List using DataFrame.loc You can also use the DataFrame.loc label-based indexer to reorder the rows of a DataFrame based on an index list. main.py import pandas as pd df = pd.DataFrame({ 'name': ['Alice', 'Bobby', 'Carl', 'Dan', ...