kyu_6.array_to_html_table package¶
Submodules¶
kyu_6.array_to_html_table.test_to_table module¶
kyu_6.array_to_html_table.to_table module¶
-
kyu_6.array_to_html_table.to_table.
to_table
(data: list, header: bool = False, index: bool = False) → str[source]¶ Takes three arguments: data, headers, index, and returns a string containing HTML tags representing the table.
- Parameters
data – a 2D array (list)
header – an optional boolean value. If True, the first row of the array is considered a header, defaults to False
index – an optional boolean value. If False, the first column in the table should contain 1-based indices of the corresponding row. If headers arguments is True, this column should have empty header. Defaults to False.
- Returns
a string containing HTML tags representing the table.