|
231 | 231 | Note that the entire file is read into a single DataFrame regardless, |
232 | 232 | use the `chunksize` or `iterator` parameter to return the data in chunks. |
233 | 233 | (Only valid with C parser) |
| 234 | +buffer_lines : int, default None |
| 235 | + DEPRECATED: this argument will be removed in a future version because its |
| 236 | + value is not respected by the parser |
| 237 | +
|
| 238 | + If low_memory is True, specify the number of rows to be read for each |
| 239 | + chunk. (Only valid with C parser) |
234 | 240 | compact_ints : boolean, default False |
235 | 241 | DEPRECATED: this argument will be removed in a future version |
236 | 242 |
|
237 | 243 | If compact_ints is True, then for any column that is of integer dtype, |
238 | 244 | the parser will attempt to cast it as the smallest integer dtype possible, |
239 | 245 | either signed or unsigned depending on the specification from the |
240 | 246 | `use_unsigned` parameter. |
241 | | -
|
242 | 247 | use_unsigned : boolean, default False |
243 | 248 | DEPRECATED: this argument will be removed in a future version |
244 | 249 |
|
@@ -452,6 +457,7 @@ def _read(filepath_or_buffer, kwds): |
452 | 457 | 'float_precision', |
453 | 458 | ]) |
454 | 459 | _deprecated_args = set([ |
| 460 | + 'buffer_lines', |
455 | 461 | 'compact_ints', |
456 | 462 | 'use_unsigned', |
457 | 463 | ]) |
@@ -810,7 +816,8 @@ def _clean_options(self, options, engine): |
810 | 816 | _validate_header_arg(options['header']) |
811 | 817 |
|
812 | 818 | for arg in _deprecated_args: |
813 | | - if result[arg] != _c_parser_defaults[arg]: |
| 819 | + parser_default = _c_parser_defaults[arg] |
| 820 | + if result.get(arg, parser_default) != parser_default: |
814 | 821 | warnings.warn("The '{arg}' argument has been deprecated " |
815 | 822 | "and will be removed in a future version" |
816 | 823 | .format(arg=arg), FutureWarning, stacklevel=2) |
|
0 commit comments