Skip to content

Commit b48f81b

Browse files
committed
Parse exponential expressions only when decimal is present
1 parent ee92b7b commit b48f81b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/_libs/src/parser/tokenizer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1831,7 +1831,7 @@ static int _str_copy_decimal_str_c(char *dst, size_t dst_sz, const char *src,
18311831
}
18321832

18331833
// Copy exponent if any
1834-
if ((ret = str_consume_nspan(&d, de - d, &s, 1, exponents)) > 0) {
1834+
if (decimal && (ret = str_consume_nspan(&d, de - d, &s, 1, exponents)) > 0) {
18351835
SAFE_CONSUME_NSPAN(d, de, s, 1, signs);
18361836
SAFE_CONSUME_SPAN(d, de, s, digits);
18371837
} else if (ret < 0) {

0 commit comments

Comments
 (0)