We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6f8c6e1 commit 118ba81Copy full SHA for 118ba81
pandas/io/excel.py
@@ -660,6 +660,7 @@ def _parse_cell(cell_contents, cell_typ):
660
# GH 12292 : error when read one empty column from excel file
661
try:
662
parser = TextParser(data,
663
+ names=names,
664
header=header,
665
index_col=index_col,
666
has_index_names=has_index_names,
@@ -681,9 +682,6 @@ def _parse_cell(cell_contents, cell_typ):
681
682
683
output[asheetname] = parser.read(nrows=nrows)
684
- if names is not None:
685
- output[asheetname].columns = names
686
-
687
if not squeeze or isinstance(output[asheetname], DataFrame):
688
output[asheetname].columns = output[
689
asheetname].columns.set_names(header_names)
0 commit comments