You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
hello,
i notice i cannot set data peroperty of DashTable indivisually.. its mentioned to be optional in documentattion.
but even if i pass differenent values to dashtable it misalignes the entire data in single row..
Hi @Vinayak-kadu - that column alignment definitely looks problematic, but from the info you've given I can't really tell what's going on. Can you provide a complete DataTable component we can run that shows this issue?
@Vinayak-kadu Note that the data property in the DataTable is a list of dict, and each dict is one row. The data you provided only contains one dictionary, ie one row, with all the data in the first row.
Also, I couldn't duplicate any misalignment of headings. Here is a MWE including some data, and the headings are aligned even when all the data is in the first row.
To include only those three columns in the table, create a new dataframe with the data you would like to display. For example: dff = df[["Date", "Region", "Temperature"]]
Then add it to the data prop like: data = dff.to_dict("records")
Below is a full example, and if you have any more questions, please feel free to post them on the Dash Community Forum
Activity
alexcjohnson commentedon Jul 11, 2021
Hi @Vinayak-kadu - that column alignment definitely looks problematic, but from the info you've given I can't really tell what's going on. Can you provide a complete
DataTablecomponent we can run that shows this issue?Thanks!
Vinayak-kadu commentedon Jul 11, 2021
here,
please do check the version in multi-headers
https://dash.plotly.com/datatable/style
only this eg is setting data property indivisually..
AnnMarieW commentedon Jul 12, 2021
@Vinayak-kadu Note that the
dataproperty in theDataTableis a list of dict, and each dict is one row. Thedatayou provided only contains one dictionary, ie one row, with all the data in the first row.To include only these three columns in the table, you could do something like:
dff = df[["Timestamp", "Spot Value", "Future Value"]]Then add it to the
dataprop like:data = dff.to_dict("records")If you inspect
datayou will see that it's in a format like:Also, I couldn't duplicate any misalignment of headings. Here is a MWE including some data, and the headings are aligned even when all the data is in the first row.
Vinayak-kadu commentedon Jul 13, 2021
@AnnMarieW
please note the problem is data values are cramped in single rows..
i think, column alignment will be normal if values are set properly
even if i try your example of multi-headers with putting single data frame object in each of it own dictionary..
i still get all the data in single row.. no matter the column alignment..
AnnMarieW commentedon Jul 20, 2021
@Vinayak-kadu
Sorry if I wasn't clear in my previous post.
To include only those three columns in the table, create a new dataframe with the data you would like to display. For example:
dff = df[["Date", "Region", "Temperature"]]Then add it to the data prop like:
data = dff.to_dict("records")Below is a full example, and if you have any more questions, please feel free to post them on the Dash Community Forum