Skip to content

.sortlevel does not retain .names in MultiIndex #202

Closed
@rsamson

Description

@rsamson

.sortlevel does not retain .names in MultiIndex. For example:

options
ForwardPrice Strike CallPut Premium
105169 57.2024993896 15.03 15.03 C 2.206
-41.0596008301 15.03 15.03 P 2.231
...

options.delevel()
SecurityID Delta ForwardPrice Strike CallPut Premium
0 105169 57.2 15.03 15.03 C 2.206
1 105169 -41.06 15.03 15.03 P 2.231
...

options = options.sortlevel(0)
options.delevel()
level_0 level_1 ForwardPrice Strike CallPut Premium
0 105169 -41.06 15.03 15.03 P 2.231
1 105169 57.2 15.03 15.03 C 2.206
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions