I would like to print out a dataframe in Excel. I am using ExcelWriter as follows:
writer = pd.ExcelWriter('test.xlsx')
df = DataFrame(C,ind) # C is the matrix and ind is the list of corresponding indices
df.to_excel(writer, startcol = 0, startrow = 5)
writer.save()
This produces what I need but in addition I would like to add a title with some text (explanations) for the data on top of the table (startcol=0
,startrow=0
).
How can I add a string title using ExcelWriter?