effective-pandas
effective-pandas copied to clipboard
Intro notebook UnsortedIndexError on the date range (cell 18)
The last cell of notebook 1 is throwing an exception, along with the message: UnsortedIndexError: 'MultiIndex slicing requires the index to be lexsorted: slicing on levels [4], lexsort depth 3'. I don't understand this, since cell 13 seems like it should be sorting the index.
python 3.7, pandas 0.23.4 and 0.24.1.
Incidentally, upgrading to 0.24.1 also broke cell 6, which crashes with KeyError: "['tail_num'] not in index" (which I don't understand at all).
All of that said, I've now learned about IndexSlice, which is truly awesome! Thanks.
I had the same problem and it was solved by setting the parameter level=[...] inside sort_index (right next to set_index)