-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
astype(object) with dtype datetime64 does wacky things when value is NaT #3414
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
Comments
Apparently you can't upload files to github issues?? See below:
|
this was fixed for 0.11 |
FYI either put code inline or u can use a gist |
actually this is a buglet (not the issue you are talking about, that is ok in 0.11, but an odd numpy related one). what version of numpy? |
For a workaround - don't wrap in np.datetime64's
|
I see this bug with both numpy 1.6.1 & numpy 1.7.1. This is a contrived testcase to illustrate my problem, not actually how I came across the bug in my codebase. Thanks for looking into it @jreback ;) |
@lexual will get to this with a slew of other np.datetime64 issues (essentially working around numpy bugs, I thought np 1.7.1 should allow this to work, but ok...will fix for 0.12 |
@lexual this should be ok in master... |
Right now we don't convert types like this (due to various numpy bugs)
And the rest works as expected (the buglet was that the np.datetime64 were not dealt with correct)
closing unless you have further comments |
Similar to #3416, failing in 0.11
Calling astype(object) when the dtype is datetime64 and there are NaT values, sets them to 2262-04-10 00:12:43.145224
I would have thought they should be set to None.
See attached test case.
The text was updated successfully, but these errors were encountered: