Code Sample
df = pd.DataFrame(list(range(8)))
a.index = pd.MultiIndex.from_product([[0,1]]*3)
a.sort_index(level=[1,2,0])
Problem description
This throws an IndexEror: pop index out of range.
If I change the order to [2,0,1], it doesn't.
python: 3.6.6.final.0
pandas: 0.24.2
numpy: 1.15.4