| Conditions | 1 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import dash |
||
| 13 | def generate_table(dataframe, max_rows=10): |
||
| 14 | return html.Table( |
||
| 15 | # Header |
||
| 16 | [html.Tr([html.Th(col) for col in dataframe.columns])] + |
||
| 17 | |||
| 18 | # Body |
||
| 19 | [html.Tr([ |
||
| 20 | html.Td(dataframe.iloc[i][col]) for col in dataframe.columns |
||
| 21 | ]) for i in range(min(len(dataframe), max_rows))] |
||
| 22 | ) |
||
| 36 |