Graphing uploaded csv data

Modifying the Upload component to plot to dcc.Graph instead of datatable?

Where should I create the ‘figure’ for the graph, in the callback function or in def parse_contents?
Also when reading a csv I would generally use x=df[‘data’], seems that won’t work in this situation, what is the better option for pulling the column label/header to plot the asscoiated data.

Either! You can also move the contents of parse_contents into your callback.

This should work as long as data is in the first row of the CSV. If not, try print(df.columns) and see what the results are.

Hi guys! Is there any example out there for uploading data and then make a graph using this data?

I am looking for a simple example of graphing uploaded CSV data but I am really striking out. Was this something you got working?

Hi gjab - did you ever receive a response to this? I’m trying to accomplish the same thing, but I’m getting stuck on how to reference the uploaded csv file as a dataframe elsewhere in the Dash code.