-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
API: NaT/nan mixed input coerces to timedelta64 #13467
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
but your result should be the same (e.g. |
OK. Also there is no tests to guarantee the behavior. Will submit a PR. |
Found there are inconsistencies depending on the order. Is it OK that all these must be datetime64?
|
Actually it is not simple than I initially thought. On current master, we don't distinguish datetime64/timedelta64 NaT. Thus below input is regarded as
However, if input is all nan/nat like, it is inferred using last element.
If we regard np.datetime/timedelta nat as the same as |
ahh I c. Since we have a single |
Code Sample, a copy-pastable example if possible
Index
/Series
results indatetime64
dtype if all inputs arepd.NaT
.However, it coerces to
timedelta64
ifnp.nan
is included.This looks to be caused by following internals:
Expected Output
datetime64
dtype?output of
pd.show_versions()
on current master
The text was updated successfully, but these errors were encountered: