Skip to content

BUG/API: index.array for RangeIndex, MultiIndex #37277

Open
@jbrockmendel

Description

@jbrockmendel

ATM MultiIndex.array raises ValueError, since there is no single array actually backing MI. RangeIndex creates and returns a PandasArray. I think RangeIndex should also raise (at least until/unless we implement a RangeArray).

This also has implications for extract_array, which currently raises on MultiIndex, which has led to some ugly checks in e.g. Index._cmp_method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIndexRelated to the Index class or subclassesMultiIndex

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions