Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intro notebook UnsortedIndexError on the date range (cell 18) #27

Open
g2boojum opened this issue Feb 4, 2019 · 1 comment
Open

Intro notebook UnsortedIndexError on the date range (cell 18) #27

g2boojum opened this issue Feb 4, 2019 · 1 comment

Comments

@g2boojum
Copy link

g2boojum commented Feb 4, 2019

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.

@vidalgp
Copy link

vidalgp commented Sep 12, 2019

I had the same problem and it was solved by setting the parameter level=[...] inside sort_index (right next to set_index)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants