Dash DataTable not showing data


I am trying to use DataTable with a very simple example:

df = pd.DataFrame({'Temperature': [1],'Desorption': [0.0],'Integral': [2.0]},index=['row1'])
            columns=[{"name": "Temperature (°C)", "id": 0},{"name": "Desorption (%/g)", "id": 1},{"name": "Integral", "id": 2}],

This does produce a table with the correct number of one row, however no data is displayed in the table. The only thing I found online was a similar issue that arose from an old Pandas version, however I am using 1.0.5 so that shouldn’t apply in my case. What am I doing wrong here?

Hi @Illmatic

If you use the column headings from the df (ie “Temperature”) rather than 0 as the “id” the table will show up

Hi @AnnMarieW,

thanks that solved my issue!

1 Like