Skip to content

Commit 3a0a035

Browse files
committed
Typing
1 parent e27b02e commit 3a0a035

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pandas/io/parsers/base_parser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,19 +276,19 @@ def _make_index(
276276
index: Index | None
277277
if isinstance(self.index_col, list) and len(self.index_col):
278278
to_remove = []
279-
index = []
279+
indexes = []
280280
for idx in self.index_col:
281281
if isinstance(idx, str):
282282
raise ValueError(f"Index {idx} invalid")
283283
to_remove.append(idx)
284-
index.append(alldata[idx])
284+
indexes.append(alldata[idx])
285285
# remove index items from content and columns, don't pop in
286286
# loop
287287
for i in sorted(to_remove, reverse=True):
288288
alldata.pop(i)
289289
if not self._implicit_index:
290290
columns.pop(i)
291-
index = self._agg_index(index)
291+
index = self._agg_index(indexes)
292292

293293
# add names for the index
294294
if indexnamerow:

pandas/io/parsers/c_parser_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ def read(
293293
if self._should_parse_dates(i):
294294
values = date_converter(
295295
values,
296-
col=self.index_names[index]
296+
col=self.index_names[i]
297297
if self.index_names is not None
298298
else None,
299299
dayfirst=self.dayfirst,

0 commit comments

Comments
 (0)