Skip to content

Index(SparseArray([int])) has object type #26972

Closed
@TomAugspurger

Description

@TomAugspurger
In [2]: pd.Index(pd.SparseArray([1, 2]))
Out[2]: Index([1, 2], dtype='object')

Should this be an Int64Index?

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugConstructorsSeries/DataFrame/Index/pd.array ConstructorsDtype ConversionsUnexpected or buggy dtype conversionsExtensionArrayExtending pandas with custom dtypes or arrays.IndexRelated to the Index class or subclasses

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions