-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
FIX: handle NaT values in dt-accessor #8084
Conversation
if I understand correctly, |
Thanks! Yes, indeed, so we only need to special case |
@keewis Do you have a recommendation how to retrieve resulting dtype for the dask-part? |
right, with |
Even testing a small subset does not reveal the dtype in any case, since the NaT might be in any chunk we do not test. So we would have to know a priori to be on the safe side also for further processing in the dask world. |
One idea for the dask-part is to just keep current behaviour. On compute, this RuntimeError is raised: RuntimeWarning: invalid value encountered in cast The user could then just use |
The current solution works for most of the Note: This does not help for the dask part, which is left unchanged. Here we would somehow need a priory knowledge if NaT is involved or not. Question: Should we add tests in this PR for handling in presence of NaT? This is currently not tested at all. |
This is good to go from my side. Unfortunately there has not been any comment on the upstream-issue so far: pandas-dev/pandas#54657. We can revisit and change when this is resolved over at pandas. |
@keewis I did not touch the dask part. I'd appreciate if you or others could have a final look for approval. Thanks. |
Will merge after tests are passing. |
whats-new.rst