ded5e66ccc
Wraps temp file operations in try/except to ensure the temporary database file is always cleaned up, even if an exception occurs during write_snapshot or verify_integrity. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
27 lines
576 B
Python
27 lines
576 B
Python
import dash_ag_grid as dag
|
|
import pandas as pd
|
|
from dash import Dash, html
|
|
|
|
df = pd.read_csv(
|
|
"https://raw.githubusercontent.com/plotly/datasets/master/gapminder2007.csv"
|
|
)
|
|
|
|
app = Dash()
|
|
|
|
columnDefs = [
|
|
{"field": "country", "filter": True},
|
|
{"field": "pop", "headerName": "Population"},
|
|
{"field": "lifeExp", "headerName": "Life Expectancy", "filter": True},
|
|
]
|
|
|
|
grid = dag.AgGrid(
|
|
id="getting-started-filter",
|
|
rowData=df.to_dict("records"),
|
|
columnDefs=columnDefs,
|
|
)
|
|
|
|
app.layout = html.Div([grid])
|
|
|
|
if __name__ == "__main__":
|
|
app.run(debug=True)
|