Skip to content

BUG: MultiIndex.from_arrays doesn't raise if arrays are unequal lengths #10127

Closed
@TomAugspurger

Description

@TomAugspurger
In [62]: index = pd.MultiIndex.from_arrays([['a', 'b', 'c'], [1, 2]])

In [63]: index
Out[63]:
MultiIndex(levels=[['a', 'b', 'c'], [1, 2]],
           labels=[[0, 1, 2], [0, 1]])

Probably not what the user wants, and we rely on them being the same length in, e.g. index.shape which will raise a ValueError if you access it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions