📜  plotly dash 数据表列宽 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:35.688000             🧑  作者: Mango

代码示例1
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'},
    ]
)