@chriddyp thank you for the quick answer.
I am a beginner so it took me some time to figure it out. But now it works.
@kejohns19 I tried to create a table based on a pandas dataframe with that guide. But I could not get it to work.
If someone else have the same problem maybe the explaination below can help you.
I copied the generate_table function from the link that @chriddyp provided. Below is a code snippet from my app,layout and the corresponding callback:
html.Div([html.H4(children='Chef'), html.Table(id='my-table')], style={'width': '49%','display': 'inline-block', 'padding': '0 20'})
#############################################################
@app.callback(Output('my-table', 'children'), [Input('my-dropdown', 'value')])
def table_update(selected_dropdown_value):
df1 = dfChef[dfChef['Förvaltningsnamn'] == selected_dropdown_value]
return generate_table(df1)