Skip to content

Commit 44b68bc

Browse files
committed
refactor: simplify code
1 parent 6aa8398 commit 44b68bc

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

pandas/_libs/parsers.pyx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,7 +1354,6 @@ cdef class TextReader:
13541354
Py_ssize_t i, lines = end - start
13551355
coliter_t it
13561356
const char *word = NULL
1357-
const char *ch
13581357

13591358
coliter_setup(&it, self.parser, col, start)
13601359

@@ -1364,14 +1363,8 @@ cdef class TextReader:
13641363
if na_filter and kh_get_str_starts_item(na_hashset, word):
13651364
continue
13661365

1367-
ch = word
1368-
while ch[0] != b"\0":
1369-
token_indicates_float = (ch[0] == self.parser.decimal
1370-
or ch[0] == b"e"
1371-
or ch[0] == b"E")
1372-
if token_indicates_float:
1373-
return True
1374-
ch += 1
1366+
if self.parser.decimal in word or b"e" in word or b"E" in word:
1367+
return True
13751368

13761369
return False
13771370

0 commit comments

Comments
 (0)