But I cannot find how to load the Dataframe (df = pd.read_csv('path') ) into th function
def destination_func():
return html.Div(
children=[
dcc.Markdown('Select country of destination'),
dcc.Dropdown(
id='destination_div',
options=[{'label': i, 'value': i} for i in df['Destination'].drop_duplicates()],
value=df['Destination'].drop_duplicates()[0]
)
]
)
The code you posted gives me the following error message:
Errors ( 1 )
Callback error updating table.children
dash.exceptions.InvalidCallbackReturnValue: The callback …table.children… is a multi-output.
Expected the output type to be a list or tuple but got:
DataTable(columns=[{‘name’: ‘Destination’, ‘id’: ‘Destination’, ‘type’: ‘any’}, {‘name’:
…