Skip to content

Commit d8a0ca4

Browse files
author
Dieter Vandenbussche
committed
BUG: handle empty index column header in xlsx, fixes #951
1 parent f58126f commit d8a0ca4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/io/parsers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ def _get_index_name(self):
412412
index_name = None
413413
elif np.isscalar(self.index_col):
414414
index_name = columns.pop(self.index_col)
415-
if 'Unnamed' in index_name:
415+
if index_name is not None and 'Unnamed' in index_name:
416416
index_name = None
417417
elif self.index_col is not None:
418418
cp_cols = list(columns)

0 commit comments

Comments
 (0)