Skip to content

BUG/API: Index.equals should check input class? #13107

Closed
@sinhrks

Description

@sinhrks

Code Sample, a copy-pastable example if possible

Decide the behavior if non Index with same values is passed. Currently, there is incompatibility between dtypes.

pd.Index([1], dtype=object).equals(pd.Series([1], dtype=object))
# False

pd.Index([1]).equals(pd.Series([1]))
# True

output of pd.show_versions()

on current master

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