Note

This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the user guide for the big picture.

brainprep.reporting.utils.dataframe_to_html

brainprep.reporting.utils.dataframe_to_html(df, precision, **kwargs)[source]

Make HTML table from provided dataframe.

Removes HTML5 non-compliant attributes (ex: border).

Parameters:
df: pd.DataFrame

Dataframe to be converted into HTML table.

precision: int

The display precision for float values in the table.

**kwargsAny

Supplies keyworded arguments for func: pandas.Dataframe.to_html()

Returns:
html_table: str

Code for HTML table.