multi-index indexing for 3-level index behaving mysteriously. · Issue #2646 · pandas-dev/pandas (original) (raw)

This seems to be solvable my using df.sortlevel, but Wesley encouraged me to submit it for further investigation.
I wrote a pretty detailed investigation here:

http://nbviewer.ipython.org/4465051/

with the gist

https://gist.github.com/4465051

In short words:
2-level indexing for a 3-level multi-index fails for me, when the size of one of the first 2 levels is larger than 9 and not using sortlevel.
In examples:

df.ix['c1','det4'] works as long as the sizes of the multi-index are up to (9,9,x) with x anything.
But if the levels size is (10,9,x) I am forced to use sortlevel(0) to make it work. (see notebook).