File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -824,7 +824,8 @@ cdef _array_to_datetime_object(
824
824
yearfirst = yearfirst)
825
825
pydatetime_to_dt64(oresult[i], & dts)
826
826
check_dts_bounds(& dts)
827
- except (ValueError , OverflowError ):
827
+ except (ValueError , OverflowError ) as ex:
828
+ ex.args = (str (ex) + f" present at position {i}" , )
828
829
if is_coerce:
829
830
oresult[i] = < object > NaT
830
831
continue
Original file line number Diff line number Diff line change @@ -2593,7 +2593,7 @@ def test_invalid_origins_tzinfo(self):
2593
2593
2594
2594
def test_incorrect_value_exception (self ):
2595
2595
# GH47495
2596
- with pytest .raises (ValueError , match = "Unknown string format: today " ):
2596
+ with pytest .raises (ValueError , match = "Unknown string format: yesterday present at position 1 " ):
2597
2597
to_datetime (["today" , "yesterday" ])
2598
2598
2599
2599
@pytest .mark .parametrize ("format" , [None , "%Y-%m-%d %H:%M:%S" ])
You can’t perform that action at this time.
0 commit comments