MCPcopy Create free account
hub / github.com/alpha2phi/python-apps / generate_table

Function generate_table

sagemaker-dash/tutorials/app3.py:13–21  ·  view source on GitHub ↗
(dataframe, max_rows=10)

Source from the content-addressed store, hash-verified

11
12
13def generate_table(dataframe, max_rows=10):
14 return html.Table([
15 html.Thead(html.Tr([html.Th(col) for col in dataframe.columns])),
16 html.Tbody([
17 html.Tr(
18 [html.Td(dataframe.iloc[i][col]) for col in dataframe.columns])
19 for i in range(min(len(dataframe), max_rows))
20 ])
21 ])
22
23
24external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']

Callers 1

app3.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected