273
273
Note that the entire file is read into a single DataFrame regardless,
274
274
use the `chunksize` or `iterator` parameter to return the data in chunks.
275
275
(Only valid with C parser)
276
- compact_ints : boolean, default False
277
- .. deprecated:: 0.19.0
278
- Argument moved to ``pd.to_numeric``
279
-
280
- If compact_ints is True, then for any column that is of integer dtype,
281
- the parser will attempt to cast it as the smallest integer dtype possible,
282
- either signed or unsigned depending on the specification from the
283
- `use_unsigned` parameter.
284
- use_unsigned : boolean, default False
285
- .. deprecated:: 0.19.0
286
- Argument moved to ``pd.to_numeric``
287
-
288
- If integer columns are being compacted (i.e. `compact_ints=True`), specify
289
- whether the column should be compacted to the smallest signed or unsigned
290
- integer dtype.
291
276
memory_map : boolean, default False
292
277
If a filepath is provided for `filepath_or_buffer`, map the file object
293
278
directly onto memory and access the data directly from there. Using this
@@ -496,8 +481,6 @@ def _read(filepath_or_buffer, kwds):
496
481
_c_parser_defaults = {
497
482
'delim_whitespace' : False ,
498
483
'na_filter' : True ,
499
- 'compact_ints' : False ,
500
- 'use_unsigned' : False ,
501
484
'low_memory' : True ,
502
485
'memory_map' : False ,
503
486
'error_bad_lines' : True ,
@@ -518,13 +501,9 @@ def _read(filepath_or_buffer, kwds):
518
501
}
519
502
520
503
_deprecated_defaults = {
521
- 'compact_ints' : None ,
522
- 'use_unsigned' : None ,
523
504
'tupleize_cols' : None
524
505
}
525
506
_deprecated_args = {
526
- 'compact_ints' ,
527
- 'use_unsigned' ,
528
507
'tupleize_cols' ,
529
508
}
530
509
@@ -596,8 +575,6 @@ def parser_f(filepath_or_buffer,
596
575
# Internal
597
576
doublequote = True ,
598
577
delim_whitespace = False ,
599
- compact_ints = None ,
600
- use_unsigned = None ,
601
578
low_memory = _c_parser_defaults ['low_memory' ],
602
579
memory_map = False ,
603
580
float_precision = None ):
@@ -662,8 +639,6 @@ def parser_f(filepath_or_buffer,
662
639
float_precision = float_precision ,
663
640
664
641
na_filter = na_filter ,
665
- compact_ints = compact_ints ,
666
- use_unsigned = use_unsigned ,
667
642
delim_whitespace = delim_whitespace ,
668
643
warn_bad_lines = warn_bad_lines ,
669
644
error_bad_lines = error_bad_lines ,
@@ -1569,11 +1544,6 @@ def _convert_to_ndarrays(self, dct, na_values, na_fvalues, verbose=False,
1569
1544
if cast_type and not is_dtype_equal (cvals , cast_type ):
1570
1545
cvals = self ._cast_types (cvals , cast_type , c )
1571
1546
1572
- if issubclass (cvals .dtype .type , np .integer ) and self .compact_ints :
1573
- cvals = lib .downcast_int64 (
1574
- cvals , parsers .na_values ,
1575
- self .use_unsigned )
1576
-
1577
1547
result [c ] = cvals
1578
1548
if verbose and na_count :
1579
1549
print ('Filled %d NA values in column %s' % (na_count , str (c )))
@@ -2064,8 +2034,6 @@ def __init__(self, f, **kwds):
2064
2034
self .converters = kwds ['converters' ]
2065
2035
self .dtype = kwds ['dtype' ]
2066
2036
2067
- self .compact_ints = kwds ['compact_ints' ]
2068
- self .use_unsigned = kwds ['use_unsigned' ]
2069
2037
self .thousands = kwds ['thousands' ]
2070
2038
self .decimal = kwds ['decimal' ]
2071
2039
0 commit comments