-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Description
I am trying to share the data between callbacks with "Storing Data in Hidden Div" method.
- First of all, I get multiple stock prices and put it into a pd.DataFrame, then I save it as a json file.
- I follow the tutorials to pd.read_json file first, the save it to the immediate Div. here is the code:
#json data processing
def data_table():
df = pd.read_json('matrix_table.json')
return df
@app.callback(dash.dependencies.Output('intermediate-value', 'children'),
[dash.dependencies.Input('stock-ticker-input', 'value')])
def clean_data(value):
# if "Dropdown" has value input
if value:
cleaned_df = data_table()
return cleaned_df
@app.callback(dash.dependencies.Output('table', 'children'),
[dash.dependencies.Input('intermediate-value', 'children')])
def update_table(jsonified_cleaned_data):
return jsonified_cleaned_data
it turns out to be an error message.
Metadata
Metadata
Assignees
Labels
No labels

