elm.utilities.parse.format_html_tables
- format_html_tables(text, **kwargs)[source]
Format tables within HTML text into pretty markdown.
Note that if pandas does not detect enough tables in the text to match the “<table>” tags, no replacement is performed at all.
- Parameters:
text (str) – HTML text, possible containing tables enclosed by the “<table>” tag.
**kwargs – Keyword-arguments to pass to
pandas.DataFrame.to_markdown
function. Must not contain the “headers” keyword (this is supplied internally).
- Returns:
str – Text with HTML tables (if any) converted to markdown.