Skip to content

Commit

Permalink
resolves #6
Browse files Browse the repository at this point in the history
  • Loading branch information
jbogaardt committed Aug 14, 2020
1 parent e0296b9 commit eb68da0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions xlcompose/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,12 @@ def _write_image(self, exhibit):

def _write_header(self, exhibit):
''' Adds column headers to data table '''
if not exhibit.index:
headers = exhibit.data.columns
if type(exhibit.data.columns) == pd.PeriodIndex:
header = exhibit.data.columns.astype(str)
else:
headers = [exhibit.index_label]+list(exhibit.data.columns)
header = exhibit.data.columns
if exhibit.index:
headers = [exhibit.index_label]+list(header)
header_format = self.default_formats.copy()
header_format.update(exhibit.header_formats)
header_format = self.writer.book.add_format(header_format)
Expand Down Expand Up @@ -850,7 +852,7 @@ class Tabs(_XLCBase):
For example, `('sheet1', xlc.DataFrame(data))`
"""
_repr_html_ = None

def __init__(self, *args, **kwargs):
self.args = [
Sheet(item[0], copy.deepcopy(item[1]))
Expand Down

0 comments on commit eb68da0

Please sign in to comment.