Skip to content

Commit ca04349

Browse files
authored
BUG: out-of-bounds pydatetime with errors='coerce' and non-ISO format coerces all elements to NaT (#50265)
* less broad try-except * avoid large outer try-except * fixup * postmerge fixup Co-authored-by: MarcoGorelli <>
1 parent 738564e commit ca04349

File tree

4 files changed

+238
-238
lines changed

4 files changed

+238
-238
lines changed

doc/source/whatsnew/v2.0.0.rst

+1
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,7 @@ Datetimelike
794794
- Bug in :func:`to_datetime` was raising ``ValueError`` when parsing empty string and non-ISO8601 format was passed. Now, empty strings will be parsed as :class:`NaT`, for compatibility with how is done for ISO8601 formats (:issue:`50251`)
795795
- Bug in :class:`Timestamp` was showing ``UserWarning``, which was not actionable by users, when parsing non-ISO8601 delimited date strings (:issue:`50232`)
796796
- Bug in :func:`to_datetime` was showing misleading ``ValueError`` when parsing dates with format containing ISO week directive and ISO weekday directive (:issue:`50308`)
797+
- Bug in :func:`to_datetime` was not raising ``ValueError`` when invalid format was passed and ``errors`` was ``'ignore'`` or ``'coerce'`` (:issue:`50266`)
797798
-
798799

799800
Timedelta

0 commit comments

Comments
 (0)