-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
pd.NaT.date() returns datetime.date(1, 255, 255) #9513
Comments
Could we make |
Yes raising a |
If you'd like to put together a PR to fix this, that would be great! |
Yes but where is defined |
NaTType is an indirect subclass of datetime, so it inherits the default
(and yes, this is Cython, but you can write pure Python code here.) This will also need a test to verify that the error is raised, probably somewhere around here: |
If there are other methods that are not returning appropriate values, feel free to override them to raise an error as well. But most of them should be supplying appropriate returns values already (e.g., |
I directly edited code on GitHub and send PR this way (because I don't have a Python install here)... I just hope that Travis CI will be ok. |
Sorry but it seems that my PR fails with CI but I try locally it should works. Any idea ? |
An other PR #9523 |
@kelvin22 Can you open a separate issue for this (because as you say, this should be fixed). If possible, please provide a reproducible example. |
should be closed too? |
Hello,
pd.NaT.date()
returnsdatetime.date(1, 255, 255)
that's an odd results
I was expecting
None
(or something else) because that's really strange to havedate of year "1" in an Excel file
Kind regards
The text was updated successfully, but these errors were encountered: