1

Usually I use the following way to show the content in a data frame on a html:

html_str='<p>'
for i in np.arange(a.shape[0]):
    id='<b>ID:  </b>'+a.loc[i,'id'].astype(str)
    html_str=html_str+id+'</p><p>'
    ......

Html_file= open(myPath+"all_validation_train_variable_alpha.html","w")
Html_file.write(html_str)
Html_file.close()

All the content will be saved into a string called html_str in my example, then show it on a html.

Now I have multiple heatmaps, for example:

import seaborn as sns
uniform_data = np.random.rand(10, 12)
ax = sns.heatmap(uniform_data)

So, how to show multiple images on a html and save it?

Feng Chen
  • 2,139
  • 4
  • 33
  • 62
  • Does this answer your question? [How to embed multiple images in email HTML using Python](https://stackoverflow.com/questions/66000228/how-to-embed-multiple-images-in-email-html-using-python) – CoolCoder May 24 '21 at 03:05
  • thanks. I saw this. But my case is simpler. I do not need to do anything with email. Just a html page – Feng Chen May 24 '21 at 03:08

0 Answers0