-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: comparison of pandas NaT with datetime.date evaluating to True #39151
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
Labels
Milestone
Comments
@arc12 Thanks for the report! I can confirm the regression. |
simonjayhawkins
added a commit
to simonjayhawkins/pandas
that referenced
this issue
Jan 14, 2021
Yah something similar came up for Timestamp. The solution is going to be to add in
|
@jbrockmendel do you have time to fix this before Monday? otherwise I can look into it. |
Yes, I'll do this right now |
Thanks @jbrockmendel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Code Sample, a copy-pastable example
Problem description
I understood the convention is for NA-types to evaluate to False in all inequalities. The above code evaluates to True.
These DO evaluate to False, as expected.
pandas.NaT < datetime.datetime.now()
pandas.NaT > datetime.datetime.now().date()
This seems to have been introduced with 1.2.0, and to not have been the behaviour under 1.1.5.
Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: