Closed
Description
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
In [18]: df = pd.DataFrame({
...: "data": range(3),
...: "pa_dates": pd.Series(["2024-01-01", "2024-01-02", "2024-01-03"], dtype=pd.ArrowDtype(pa.timestamp("s"))),
...: "pd_dates": pd.Series(["2024-01-01", "2024-01-02", "2024-01-03"], dtype="datetime64[s]"),
...: })
...:
In [19]: df.set_index("pd_dates").loc[:"2024-01-01"]
...:
Out[19]:
data pa_dates
pd_dates
2024-01-01 0 2024-01-01 00:00:00
In [20]: df.set_index("pa_dates").loc[:"2024-01-01"]
TypeError: '<' not supported between instances of 'datetime.datetime' and 'str'
### Issue Description
TypeError: '<' not supported between instances of 'datetime.datetime' and 'str'
### Expected Behavior
I would expect the pyarrow backed datetimeindex to be supported just like the pandas one
### Installed Versions
In [21]: pd.__version__
Out[21]: '3.0.0.dev0+681.g434fda08cf'