1

I am trying to add CSS to the top of HTML generated by DataFrame.to_html() by df.style.set_properties(color="green")

The df.to_html("filename.html") generates the following output

<table border="1" class="dataframe">

......

The question is how can I print the CSS info at the top of the output file?

<a color="green"/a> <=====
<table border="1" class="dataframe">
MaxU - stand with Ukraine
  • 205,989
  • 36
  • 386
  • 419
user3586164
  • 155
  • 1
  • 1
  • 10

0 Answers0