@@ -138,7 +138,7 @@ cdef extern from "parser/tokenizer.h":
138
138
139
139
# Store words in (potentially ragged) matrix for now, hmm
140
140
char ** words
141
- int64_t * word_starts # where we are in the stream
141
+ int64_t * word_starts # where we are in the stream
142
142
int64_t words_len
143
143
int64_t words_cap
144
144
@@ -400,7 +400,7 @@ cdef class TextReader:
400
400
raise ValueError (' only length-1 separators excluded right now' )
401
401
self .parser.delimiter = ord (delimiter)
402
402
403
- # ----------------------------------------
403
+ # ----------------------------------------
404
404
# parser options
405
405
406
406
self .parser.doublequote = doublequote
@@ -519,7 +519,7 @@ cdef class TextReader:
519
519
520
520
self .index_col = index_col
521
521
522
- # ----------------------------------------
522
+ # ----------------------------------------
523
523
# header stuff
524
524
525
525
self .allow_leading_cols = allow_leading_cols
@@ -810,7 +810,7 @@ cdef class TextReader:
810
810
if hr == self .header[- 1 ]:
811
811
lc = len (this_header)
812
812
ic = (len (self .index_col) if self .index_col
813
- is not None else 0 )
813
+ is not None else 0 )
814
814
if lc != unnamed_count and lc - ic > unnamed_count:
815
815
hr -= 1
816
816
self .parser_start -= 1
@@ -848,7 +848,7 @@ cdef class TextReader:
848
848
# Corner case, not enough lines in the file
849
849
if self .parser.lines < data_line + 1 :
850
850
field_count = len (header[0 ])
851
- else : # not self.has_usecols:
851
+ else : # not self.has_usecols:
852
852
853
853
field_count = self .parser.line_fields[data_line]
854
854
@@ -1374,6 +1374,7 @@ def _ensure_encoded(list lst):
1374
1374
result.append(x)
1375
1375
return result
1376
1376
1377
+
1377
1378
cdef asbytes(object o):
1378
1379
if PY3:
1379
1380
return str (o).encode(' utf-8' )
@@ -1417,11 +1418,13 @@ def _maybe_upcast(arr):
1417
1418
1418
1419
return arr
1419
1420
1421
+
1420
1422
cdef enum StringPath:
1421
1423
CSTRING
1422
1424
UTF8
1423
1425
ENCODED
1424
1426
1427
+
1425
1428
# factored out logic to pick string converter
1426
1429
cdef inline StringPath _string_path(char * encoding):
1427
1430
if encoding != NULL and encoding != b" utf-8" :
@@ -1430,9 +1433,12 @@ cdef inline StringPath _string_path(char *encoding):
1430
1433
return UTF8
1431
1434
else :
1432
1435
return CSTRING
1436
+
1437
+
1433
1438
# ----------------------------------------------------------------------
1434
1439
# Type conversions / inference support code
1435
1440
1441
+
1436
1442
cdef _string_box_factorize(parser_t * parser, int64_t col,
1437
1443
int64_t line_start, int64_t line_end,
1438
1444
bint na_filter, kh_str_t * na_hashset):
@@ -1782,7 +1788,7 @@ cdef inline int _try_double_nogil(parser_t *parser,
1782
1788
parser.sci, parser.thousands, 1 )
1783
1789
if errno != 0 or p_end[0 ] or p_end == word:
1784
1790
if (strcasecmp(word, cinf) == 0 or
1785
- strcasecmp(word, cposinf) == 0 ):
1791
+ strcasecmp(word, cposinf) == 0 ):
1786
1792
data[0 ] = INF
1787
1793
elif strcasecmp(word, cneginf) == 0 :
1788
1794
data[0 ] = NEGINF
@@ -1803,7 +1809,7 @@ cdef inline int _try_double_nogil(parser_t *parser,
1803
1809
parser.sci, parser.thousands, 1 )
1804
1810
if errno != 0 or p_end[0 ] or p_end == word:
1805
1811
if (strcasecmp(word, cinf) == 0 or
1806
- strcasecmp(word, cposinf) == 0 ):
1812
+ strcasecmp(word, cposinf) == 0 ):
1807
1813
data[0 ] = INF
1808
1814
elif strcasecmp(word, cneginf) == 0 :
1809
1815
data[0 ] = NEGINF
@@ -2263,6 +2269,7 @@ def _compute_na_values():
2263
2269
}
2264
2270
return na_values
2265
2271
2272
+
2266
2273
na_values = _compute_na_values()
2267
2274
2268
2275
for k in list (na_values):
@@ -2362,6 +2369,7 @@ def _to_structured_array(dict columns, object names, object usecols):
2362
2369
2363
2370
return recs
2364
2371
2372
+
2365
2373
cdef _fill_structured_column(char * dst, char * src, int64_t elsize,
2366
2374
int64_t stride, int64_t length, bint incref):
2367
2375
cdef:
0 commit comments