Skip to content

Commit 9d3b739

Browse files
committed
moved '_string_to_dts_noexc' from 'try' block
1 parent a22b52a commit 9d3b739

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pandas/_libs/tslib.pyx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -580,11 +580,11 @@ cpdef array_to_datetime(ndarray[object] values, str errors='raise',
580580
iresult[i] = NPY_NAT
581581
continue
582582

583+
string_to_dts_failed = _string_to_dts_noexc(
584+
val, &dts, &out_local,
585+
&out_tzoffset
586+
)
583587
try:
584-
string_to_dts_failed = _string_to_dts_noexc(
585-
val, &dts, &out_local,
586-
&out_tzoffset
587-
)
588588
if string_to_dts_failed:
589589
# An error at this point is a _parsing_ error
590590
# specifically _not_ OutOfBoundsDatetime

0 commit comments

Comments
 (0)