|
2 | 2 | Module contains tools for processing files into DataFrames or other objects
|
3 | 3 | """
|
4 | 4 | from __future__ import print_function
|
5 |
| -from pandas.compat import range, lrange, StringIO, lzip, zip, string_types |
| 5 | +from pandas.compat import range, lrange, StringIO, lzip, zip, string_types, map |
6 | 6 | from pandas import compat
|
7 | 7 | import re
|
8 | 8 | import csv
|
9 |
| -from warnings import warn |
10 | 9 |
|
11 | 10 | import numpy as np
|
12 | 11 |
|
@@ -266,7 +265,6 @@ def _read(filepath_or_buffer, kwds):
|
266 | 265 | 'buffer_lines': None,
|
267 | 266 | 'error_bad_lines': True,
|
268 | 267 | 'warn_bad_lines': True,
|
269 |
| - 'factorize': True, |
270 | 268 | 'dtype': None,
|
271 | 269 | 'decimal': b'.'
|
272 | 270 | }
|
@@ -340,8 +338,7 @@ def parser_f(filepath_or_buffer,
|
340 | 338 | encoding=None,
|
341 | 339 | squeeze=False,
|
342 | 340 | mangle_dupe_cols=True,
|
343 |
| - tupleize_cols=False, |
344 |
| - factorize=True): |
| 341 | + tupleize_cols=False): |
345 | 342 |
|
346 | 343 | # Alias sep -> delimiter.
|
347 | 344 | if delimiter is None:
|
@@ -400,8 +397,7 @@ def parser_f(filepath_or_buffer,
|
400 | 397 | low_memory=low_memory,
|
401 | 398 | buffer_lines=buffer_lines,
|
402 | 399 | mangle_dupe_cols=mangle_dupe_cols,
|
403 |
| - tupleize_cols=tupleize_cols, |
404 |
| - factorize=factorize) |
| 400 | + tupleize_cols=tupleize_cols) |
405 | 401 |
|
406 | 402 | return _read(filepath_or_buffer, kwds)
|
407 | 403 |
|
@@ -680,7 +676,7 @@ def __init__(self, kwds):
|
680 | 676 | is_sequence = isinstance(self.index_col, (list, tuple,
|
681 | 677 | np.ndarray))
|
682 | 678 | if not (is_sequence and
|
683 |
| - all(com.is_integer(i) for i in self.index_col) or |
| 679 | + all(map(com.is_integer, self.index_col)) or |
684 | 680 | com.is_integer(self.index_col)):
|
685 | 681 | raise ValueError("index_col must only contain row numbers "
|
686 | 682 | "when specifying a multi-index header")
|
|
0 commit comments