0

I am exporting pandas dataframe as table in html , exported to outlook. The table appears fine but the double cell borders are not good, I want a single line border, check the attached screenshot and code. enter image description here

df[['Col1','col2']].to_html( header=True, index=False, na_rep='NaN', formatters=None,  sparsify=None, index_names=True, justify=None,  classes=None, notebook=False, border=1, table_id=None)
oguz ismail
  • 1
  • 16
  • 47
  • 69
Abhinav Kumar
  • 177
  • 2
  • 5
  • 22

1 Answers1

1

You can replace border 1 to 0 if you must use border.

to_html().replace('border="1"','border="0"')

However, the border attribute is not supported in HTML5. Use CSS instead. This post would be ideal for you.

prosti
  • 42,291
  • 14
  • 186
  • 151