I’m trying to run a function based on an input of a dropdown.
@app.callback(Output('table', 'rows'), [Input('field-dropdown', 'value')] , , [Event('submit-button', 'click')]) def update_table(user_selection): df = run_function(user_selection) return df.to_dict('records')
The function produces a dataframe, which I want the app to portray. The function works perfectly when I run it alone, but in the app, no table is produced giving me an error ‘Key must be string’.
What does this mean and how can I resolve it?