Skip to content

sort_index throws IndexError for some permutations #26053

Closed
@soerenwolfers

Description

@soerenwolfers

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions