I have a dash.datatable like below a but the column width is too long for my values, the column width should be limited to the maximum length word of the respective column.
my code:
app = JupyterDash(__name__)
df = pd.DataFrame(
{
"A" : ["one","two","three"],
"B" : ["one","two","three"],
"C" : ["one","two","three"],
}
)
app.layout = dash_table.DataTable(
data=df.to_dict('records'),
columns=[{'id': c, 'name': c} for c in df.columns],
style_data={
'whiteSpace': 'normal',
'height': 'auto',
},
)
if __name__ == "__main__":
app.run_server(mode="jupyterlab")
My DataTable looks like:

