📅  最后修改于: 2022-03-11 14:45:35.688000             🧑  作者: Mango
app.layout = dash_table.DataTable(
data=df.to_dict('records'),
columns=[{'id': c, 'name': c} for c in df.columns],
style_cell_conditional=[
{'if': {'column_id': 'Temperature'},
'width': '130px'},
{'if': {'column_id': 'Humidity'},
'width': '130px'},
{'if': {'column_id': 'Pressure'},
'width': '130px'},
]
)