Skip to content

Commit 7366e64

Browse files
committed
fix: handle string after overflow
1 parent 3e1a991 commit 7366e64

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pandas/_libs/parsers.pyx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,8 +1082,13 @@ cdef class TextReader:
10821082
np.dtype("object"), i, start, end, 0,
10831083
0, na_hashset, na_fset)
10841084
except OverflowError:
1085-
col_res, na_count = _try_pylong(self.parser, i, start,
1086-
end, na_filter, na_hashset)
1085+
try:
1086+
col_res, na_count = _try_pylong(self.parser, i, start,
1087+
end, na_filter, na_hashset)
1088+
except ValueError:
1089+
col_res, na_count = self._convert_with_dtype(
1090+
np.dtype("object"), i, start, end, 0,
1091+
0, na_hashset, na_fset)
10871092

10881093
if col_res is not None:
10891094
break

0 commit comments

Comments
 (0)