Remove border from html table created via pandas
to_html()
generates <table border="1" class="dataframe">...
You could just do:
ricSubscription.to_html().replace('border="1"','border="0"')
Also, to answer specifically, there does not appear to be anything you can pass. border="1"
appears to be hardcoded:
As of version 0.19.0, pandas to_html()
borders can be changed in two ways:
- Globally:
pd.options.html.border = 0
- Locally:
to_html(border = 0)
UPDATE 2019-07-11:
Per @Hagbard's comment, my original global solution has been deprecated in favor of the following:pd.options.display.html.border = 0
Docs: https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.to_html.html