toHtmlTable

fun <T> DataFrame<T>.toHtmlTable(caption: String? = null, precision: Int = 4): String(source)

Renders this DataFrame as an HTML <table> string.

Column alignment is inferred automatically: columns whose every cell is a finite Double (or the placeholder "—") are right-aligned; all other columns are left-aligned. Non-finite Double values (NaN, Infinity, -Infinity) are formatted as "—" regardless of precision.

Return

a self-contained <table>…</table> HTML string (no surrounding page structure); suitable for embedding in a larger HTML document

Parameters

caption

optional <caption> element inserted at the top of the table

precision

number of decimal places used when formatting Double values; must be in [0, 15]