Skip to content

BUG: stacking multiple levels #7660

Closed
@jreback

Description

@jreback

from #7653
cc @bluefir

df = DataFrame(np.random.randn(1000, 27), 
               columns=MultiIndex.from_tuples(list(
                                   itertools.product(xrange(3), repeat=3))))
df.stack(level=[1, 2])

should be equiv to:

df.stack(level=1).stack(level=1)

but is raising

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugReshapingConcat, Merge/Join, Stack/Unstack, Explode

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions