Repository navigation
Commit dca8c7e
committed
fix(test): return Series (not ndarray) from _parse_expected_datetime_column
pandas 2.x's Series.dt.to_pydatetime() returns an ndarray, tripping
mypy's return-type check against the pd.Series annotation and
(without dtype='object') letting pandas coerce the datetime.datetime
objects back to pd.Timestamp when Series wraps them — which
reintroduces the nanosecond overflow this helper exists to avoid.
Wrap with dtype='object' and preserve the source index.
Signed-off-by: mokashang <shangmengjiajiajia@gmail.com>1 parent 3e8ea6c commit dca8c7e
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1032 | 1032 | | |
1033 | 1033 | | |
1034 | 1034 | | |
1035 | | - | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
1036 | 1040 | | |
1037 | 1041 | | |
1038 | 1042 | | |
| |||
0 commit comments