I have a pandas data frame I want to reorder the index using a specific order.
from random import randint
import pandas as pd
days = ["Tuesday", "Thursday", "Monday", "Wednesday"]
df = pd.DataFrame({"Value": [randint(0, 9) for i in range(len(days)*2)]},
index=[day for day in days for i in range(2)])
myorder = ["Monday", "Tuesday", "Wednesday", "Thursday"]
The specific order is as notified by the list myorder