Black Lives Matter. Please consider donating to Black Girls Code today.

How to combine Dash Uploads with Shared Variables?

I’ve consulted dash-recipes as well as the user-guide and haven’t found an example of this. Ideally I would like to use the upload component to upload a csv and return a pandas.dataframe that is then used as a shared variable between two or more plots.

When I try to follow the example using shared variables my df.to_json(date_format='iso',orient='split') object is evaluated as a Nonetype in the plotting functions. I have verified that the upload component and the csv file in fact do work by copying the this example exactly. However none of the examples show how to return an object besides a datatable.

Any boilerplate/template code demonstrating this would be greatly appreciated.

1 Like