Skip to content

Commit 20d512f

Browse files
committed
BUG: fix for bug 16493
1 parent 6bef829 commit 20d512f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pandas/io/formats/format.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1292,7 +1292,9 @@ def _column_header():
12921292
self.write_tr(col_row, indent, self.indent_delta, header=True,
12931293
align=align)
12941294

1295-
if self.fmt.has_index_names and self.fmt.index and self.fmt.show_index_names:
1295+
if all(self.fmt.has_index_names,
1296+
self.fmt.index,
1297+
self.fmt.show_index_names):
12961298
row = ([x if x is not None else ''
12971299
for x in self.frame.index.names] +
12981300
[''] * min(len(self.columns), self.max_cols))

0 commit comments

Comments
 (0)