-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
BUG: series construction from dict of Timedelta scalar doesn't work #38032
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
It seems it is actually the "expected" construction that doesn't work, and not the construction from a dict:
So this last method seems to lose the nanoseconds .. |
pd.Timedelta insertion into an ndarray behaves strangely for small values.
For this issue, this happens here. |
Ah, that's because numpy only knows So we will need to handle that a bit differently on the pandas side for datetime/timedelta dtypes (eg filling the array with the integer representation fo the datetime/timedelta, and casting to datetime64/timedelta64 afterwards). |
@ma3da want to do a PR for this? |
Ah ok, so there's no hope to fix the np cast "directly". Ok, i'll look into it. |
Construction of
Series
from a dictionary of scalars sometimes fails:Code Sample, a copy-pastable example
Ran on 1.2 master
The text was updated successfully, but these errors were encountered: