Hi,
I’m trying to generate an html table using Table component of dash html package, but I’m getting error loading dependencies error.
Could anyone help me with this ?
I’m doing the below
def generate_table(dataframe, max_rows=10):
return html.Table(
# Header
[html.Tr([html.Th(col) for col in dataframe.columns])] +
# Body
[html.Tr([
html.Td(dataframe.iloc[i][col]) for col in dataframe.columns
]) for i in range(min(len(dataframe), max_rows))]
)
html.Div([
generate_table(my_dataframe)
])
Update: - I checkd in my browser and I can see the below error logged in console.
bundle.js:2 Error: component.type is undefined
at i (<html link, i’m not allowed to put more than 2 links here, so can’t post that link>:2 Error: component.type is undefined
Regards,
Prabhakar