-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Test to datetime null to NaT #45512
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
Test to datetime null to NaT #45512
Conversation
ryangilmour
commented
Jan 20, 2022
•
edited
Loading
edited
- closes BUG: pd.to_datetime() raises InvalidIndexError with Null-like arguments #35888
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
- whatsnew entry
…/pandas into test_to_datetime_null_to_NaT
Looks like there's typing errors:
|
("input", "expected"), | ||
( | ||
( | ||
Series([NaT] * 200 + [None] * 200, dtype="object"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind using less values here? (20/40 should be good)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't we have a predefined breakpoitn with 50 values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but IIRC that's needed when specifically testing caching behavior
@mroeschke - thanks for the review. I'll reduce the size of the test series. I've now got the dev environment set up to run mypy locally now. But I'm unsure how to change the code to avoid typing errors. Mypy complains with either of the following
Possible fixes:
|
I would just use |
I think we DO need to test a larger input (as well) here e.g. 'It only occurs if the input is large enough to force the caching mechanism.' |
@ryangilmour can you merge master and address comments |
Yep - i'll get round to this in the next few days. |
thanks @ryangilmour |