-
-
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
DOCS: series.astype return error when a datetime64 (unitless) series astype numpy.datetime64 #47844
Comments
Looks like passing |
Is it worth defaulting this case to nanosecond or just documenting this change? |
i think just document, otherwise we're special-casing in this one place and will be inconsistent elsewhere |
I ran into this issue as well in the dask test suite, this change is giving some failures there (dask/dask#9465). So this worked before:
and is now indeed raising. I agree that we should ideally raise in this case, but given this has been working fine, I think we should consider deprecating this first. |
Seems this was reintroduced in pandas 2.0.0? |
Seem to have the same issue, worked fine in |
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
I'm not sure whether it is expect behavior. I can repro on main branch, but can not repro on 1.4.x.
I know pandas community introduce a new feature about ENH: DTI/DTA.astype support non-nano . But the new feature disable the original code tree.
In this case, the original code tree will locate on
But now, it is
And raise an error.
Expected Behavior
Installed Versions
pandas-1.5.0.dev0+1135.gc711be009b
The text was updated successfully, but these errors were encountered: