Skip to content

Commit f7f214b

Browse files
committed
CLN: Minor cleanup in parsers.py
* 'index' variable gets initialized twice. * Remove unnecessary parentheses.
1 parent bc69dc6 commit f7f214b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pandas/io/parsers.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -1431,7 +1431,6 @@ def ix(col):
14311431
if not isinstance(col, compat.string_types):
14321432
return col
14331433
raise ValueError('Index %s invalid' % col)
1434-
index = None
14351434

14361435
to_remove = []
14371436
index = []
@@ -1462,8 +1461,6 @@ def _get_name(icol):
14621461
if i == icol:
14631462
return c
14641463

1465-
index = None
1466-
14671464
to_remove = []
14681465
index = []
14691466
for idx in self.index_col:
@@ -1484,7 +1481,7 @@ def _agg_index(self, index, try_parse_dates=True):
14841481

14851482
for i, arr in enumerate(index):
14861483

1487-
if (try_parse_dates and self._should_parse_dates(i)):
1484+
if try_parse_dates and self._should_parse_dates(i):
14881485
arr = self._date_conv(arr)
14891486

14901487
col_na_values = self.na_values

0 commit comments

Comments
 (0)