Display values in a table format. table: an iterable of rows, and each row is an iterable of values.
(table)
| 401 | |
| 402 | |
| 403 | def display_table(table): |
| 404 | """Display values in a table format. |
| 405 | table: an iterable of rows, and each row is an iterable of values. |
| 406 | """ |
| 407 | html = "" |
| 408 | for row in table: |
| 409 | row_html = "" |
| 410 | for col in row: |
| 411 | row_html += "<td>{:40}</td>".format(str(col)) |
| 412 | html += "<tr>" + row_html + "</tr>" |
| 413 | html = "<table>" + html + "</table>" |
| 414 | IPython.display.display(IPython.display.HTML(html)) |
| 415 | |
| 416 | |
| 417 | def display_weight_stats(model): |
no test coverage detected