Skip to content

Commit 8a11b2c

Browse files
author
Marco Gorelli
committed
fail if is integer/float
1 parent 8cdb200 commit 8a11b2c

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

pandas/_libs/tslib.pyx

-10
Original file line numberDiff line numberDiff line change
@@ -655,16 +655,6 @@ cpdef array_to_datetime(
655655
_ts = convert_datetime_to_tsobject(py_dt, None)
656656
iresult[i] = _ts.value
657657
if not string_to_dts_failed:
658-
if require_iso8601:
659-
if is_coerce:
660-
iresult[i] = NPY_NAT
661-
continue
662-
elif is_raise:
663-
raise ValueError(
664-
f"time data \"{val}\" at position {i} doesn't "
665-
f"match format \"{format}\""
666-
)
667-
return values, tz_out
668658
# No error reported by string_to_dts, pick back up
669659
# where we left off
670660
value = npy_datetimestruct_to_datetime(NPY_FR_ns, &dts)

0 commit comments

Comments
 (0)