Skip to content

Commit 4c8d770

Browse files
committed
chore: better error message
1 parent c7fc292 commit 4c8d770

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/_libs/parsers.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,7 @@ cdef class TextReader:
10781078
col_res, na_count = self._convert_with_dtype(
10791079
dt, i, start, end, na_filter, 0, na_hashset, na_fset, True)
10801080
except ValueError as e:
1081-
if str(e) == "Number is float":
1081+
if str(e) == "Number is not int":
10821082
maybe_int = False
10831083
continue
10841084
else:
@@ -1775,7 +1775,7 @@ cdef _try_uint64(parser_t *parser, int64_t col,
17751775
# Can't get the word variable
17761776
raise OverflowError("Overflow")
17771777
elif raise_on_float and error == ERROR_INVALID_CHARS:
1778-
raise ValueError("Number is float")
1778+
raise ValueError("Number is not int")
17791779
elif not raise_on_float or error != ERROR_INVALID_CHARS:
17801780
return None
17811781

@@ -1848,7 +1848,7 @@ cdef _try_int64(parser_t *parser, int64_t col,
18481848
# Can't get the word variable
18491849
raise OverflowError("Overflow")
18501850
elif raise_on_float and error == ERROR_INVALID_CHARS:
1851-
raise ValueError("Number is float")
1851+
raise ValueError("Number is not int")
18521852
elif not raise_on_float or error != ERROR_INVALID_CHARS:
18531853
return None, None
18541854

0 commit comments

Comments
 (0)