Multiheader tables in Plotly/Python

Hello Guys, I was trying to replicate something like this table in Plotly. The table has multiheaders and different conditional formatting… I would love some direction and advice on how to go on about doing this and even if it is possible using plotly.

I think you can use dash_ag_grid for this goal. Below is my sample based on dash_ag_grid documentation here:

import dash_ag_grid as dag
from dash import Dash, html, dcc

app = Dash(__name__)

columnDefs = [{"headerName":"Example_1", "children":[{"field":"Row ID"},
              {"headerName":"Example_2", "children":[{"field":"model"},

data = [
    {"make": "Toyota", "model": "Celica", "price": 35000},
    {"make": "Ford", "model": "Mondeo", "price": 32000},
    {"make": "Porsche", "model": "Boxster", "price": 72000},
    {"make": "BMW", "model": "M50", "price": 60000},
    {"make": "Aston Martin", "model": "DBX", "price": 190000},

app.layout = html.Div(
        dcc.Markdown("This grid shows the grid assigned ids"),
            defaultColDef={"resizable": True, "sortable": True, "filter": True},
            getRowStyle={"styleConditions":[{"condition":" === 'Ford'",
    style={"margin": 20},

if __name__ == "__main__":


Thanks a lot for this, this seems very straightforward. However, I did have one question. Would it be possible to export this dash table to embed onto html? either inline or explicitly as a png/html as you could do with the Plotly graphs? My priimary usecase is embedding different tables and graphs onto html and exporting the whole thing as a PDF so I was wondering if this would play into the situation.