I have a question about formatting Python output:
my output looks like:
I want the output looks like this:
How to add underline and double underline to a dataframe? Thanks a lot.
But does not work...
I also tried:
writer = pd.ExcelWriter(r"C:\Users\2222222222.xlsx")
workbook = writer.book
cell_format = workbook.add_format()
cell_format.set_underline()
fat_age_all.to_excel(writer, 'by Age',index = False, startrow=3, startcol=0)
worksheet.set_row(5, cell_format)
writer.save()
It does not work too. Please help thanks a lot.