Skip to content

Commit

Permalink
CLN: Minor cleanup in parsers.py
Browse files Browse the repository at this point in the history
* 'index' variable gets initialized twice.
* Remove unnecessary parentheses.
  • Loading branch information
gfyoung committed Nov 5, 2017
1 parent bc69dc6 commit f7f214b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pandas/io/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1431,7 +1431,6 @@ def ix(col):
if not isinstance(col, compat.string_types):
return col
raise ValueError('Index %s invalid' % col)
index = None

to_remove = []
index = []
Expand Down Expand Up @@ -1462,8 +1461,6 @@ def _get_name(icol):
if i == icol:
return c

index = None

to_remove = []
index = []
for idx in self.index_col:
Expand All @@ -1484,7 +1481,7 @@ def _agg_index(self, index, try_parse_dates=True):

for i, arr in enumerate(index):

if (try_parse_dates and self._should_parse_dates(i)):
if try_parse_dates and self._should_parse_dates(i):
arr = self._date_conv(arr)

col_na_values = self.na_values
Expand Down

0 comments on commit f7f214b

Please sign in to comment.