Timedelta Comparisons Inconsistent #23684
Labels
Algos
Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff
Compat
pandas objects compatability with Numpy or Python functions
Numeric Operations
Arithmetic, Comparison, and Logical operations
Timedelta
Timedelta data type
Motivation: fleshing out some
Tick
operations, in particular comparisons. The natural thing to do for these is to dispatch to theirTimedelta
implementations. But since #20829 this now fails.We have existing tests that e.g.
Minute(1) < "foo"
raises aTypeError
. But since 20829Timedelta(minutes=1) < "foo"
only raises in PY3.We should consider reverting 20829, or at least making it more specific to only return
NotImplemented
for specific types, rather than any non-comparable type.The text was updated successfully, but these errors were encountered: