File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -595,7 +595,7 @@ cpdef array_to_datetime(
595
595
continue
596
596
elif is_raise:
597
597
raise ValueError (
598
- f" time data {val} doesn't match format specified"
598
+ f" time data \" {val} \" at position {i } doesn't match format specified"
599
599
)
600
600
return values, tz_out
601
601
@@ -607,11 +607,11 @@ cpdef array_to_datetime(
607
607
# to check if all arguments have the same tzinfo
608
608
tz = py_dt.utcoffset()
609
609
610
- except (ValueError , OverflowError ):
610
+ except (ValueError , OverflowError ) as err :
611
611
if is_coerce:
612
612
iresult[i] = NPY_NAT
613
613
continue
614
- raise TypeError ( " invalid string coercion to datetime" )
614
+ raise type (err)(f " invalid string coercion to datetime for \" {val} \" at position {i} " )
615
615
616
616
if tz is not None :
617
617
seen_datetime_offset = True
You can’t perform that action at this time.
0 commit comments