-
Notifications
You must be signed in to change notification settings - Fork 13
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
NaT issue #55
Comments
Hello--thanks for filing this issue. I'd like to replicate your problem as accurately as I can before I start addressing the issue. I have some sample code below but I'm not sure what you're using as the requirement:
Can you tell me what your requirement value is? |
Thanks for you reply.
Here I want to accept the NaT type data. I tried pd.NaT, np.datetime64('NaT'), or NanToken method mentioned in the document and the results are the same:
|
Ah, OK. As a stopgap, you can use the
The For a longer term solution, I want to bring the handling of these NaT values inline with how datatest handles other NaN values (as documented here). I will follow up when I have addressed this issue more thoroughly. |
Thank you so much. |
I'm glad you found it helpful. I noticed that your
One difference with this approach is that time differences trigger |
Greetings, @shawnbrown
to be short,
my pd.Series is like:
Date
0 NaT
1 NaT
2 NaT
3 2010-12-31
4 2010-12-31
Name: Date, dtype: datetime64[ns]
the type of NaT is:
<class 'pandas._libs.tslibs.nattype.NaTType'>
when I use the following code:
with accepted(Extra(pd.NaT)):
validate(data, requirement)
I found that it the NaTs can not be recognized. I tried many types of Extra and tried using function but all faild.
here I need your help. Thanks for your work.
The text was updated successfully, but these errors were encountered: