Skip to content

BUG: DatetimeIndex.get_indexer(timestamp[pyarrow]) #62277

@jbrockmendel

Description

@jbrockmendel

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

dti = pd.date_range("2016-01-01", periods=3)
arr = dti.astype("timestamp[ns][pyarrow]")

>>> dti.get_indexer(arr)
array([-1, -1, -1])

Issue Description

i suspect the problem is in is_comparable_dtype.

Note this is the underlying issue behind #61231

Expected Behavior

dti.get_indexer(dti)
array([0, 1, 2])

Installed Versions

Replace this line with the output of pd.show_versions()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Arrowpyarrow functionalityBugDatetimeDatetime data dtype

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions