The to_html() function converts a DataFrame into a raw HTML format:
df.to_html()
This results in the following output:
DataFrame in HTML format
A horde of options in the to_html() function allow the raw HTML to be enriched. Being able to select columns and control escape sequences is possible through the use of the columns and escape arguments.