Skip to content

Timedelta Comparisons Inconsistent #23684

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jbrockmendel opened this issue Nov 14, 2018 · 1 comment
Closed

Timedelta Comparisons Inconsistent #23684

jbrockmendel opened this issue Nov 14, 2018 · 1 comment
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

Comments

@jbrockmendel
Copy link
Member

Motivation: fleshing out some Tick operations, in particular comparisons. The natural thing to do for these is to dispatch to their Timedelta implementations. But since #20829 this now fails.

We have existing tests that e.g. Minute(1) < "foo" raises a TypeError. But since 20829 Timedelta(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.

@gfyoung gfyoung added Timedelta Timedelta data type Algos Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff Compat pandas objects compatability with Numpy or Python functions labels Nov 14, 2018
@jbrockmendel jbrockmendel added the Numeric Operations Arithmetic, Comparison, and Logical operations label Oct 16, 2019
@jbrockmendel
Copy link
Member Author

Not relevant since py2 has been dropped, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants