-
-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Open
Labels
BugDatetimeDatetime data dtypeDatetime data dtypeNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operationsdatetime.datestdlib datetime.date supportstdlib datetime.date support
Description
ser = pd.Series(["2016-01-01"], dtype="date32[pyarrow]")
ser2 = ser.astype("timestamp[ns][pyarrow]")
ser3 = ser.astype("datetime64[ns]")
assert (ser3 != ser[0]).all()
assert (ser3 != ser).all()
assert (ser == ser3).all() # <- uh-oh! inconsistent with reversed operation
assert (ser == ser2).all() # inconsistent with the non-pyarrow behavior
assert (ser2 == ser).all()
Long ago we made a decision that datetime64 arrays (and Timestamp) were not comparable to date objects, matching the stdlib behavior. We should have that behavior for pyarrow dtypes too.
Metadata
Metadata
Assignees
Labels
BugDatetimeDatetime data dtypeDatetime data dtypeNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operationsdatetime.datestdlib datetime.date supportstdlib datetime.date support