-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: to_datetime raising on invalid offsets with errors=coerce and infer_datetime_format #48676
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
BUG: to_datetime raising on invalid offsets with errors=coerce and infer_datetime_format #48676
Conversation
cf5bc0a
to
73611e8
Compare
…fer_datetime_format
73611e8
to
4c00b86
Compare
# GH 28299 | ||
ts_strings = ["200622-12-31", "111111-24-11"] | ||
result = to_datetime(ts_strings, errors="coerce") |
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.
Curious, do we have a similar test when errors="ignore"
?
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.
good catch! indeed, that errors
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.
actually it's fine (I may not have rebuilt my c extensions when I left the comment above) - have parametrised over errors
in the test now, thanks
…-format-on-wrong-offset
Thanks @MarcoGorelli |
…fer_datetime_format (pandas-dev#48676) * BUG: to_datetime raising on invalid offsets with errors=coerce and infer_datetime_format * fix invalid type test * test errors=ignore as well Co-authored-by: MarcoGorelli <>
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.