I’ve read the docs but didn’t see any mention of the index… and weirdly, the examples in there don’t even show the index number. How do I remove the numbers in the column headers?
...
ep1_df = pd.read_json('json/episode1.json')
# Create the Dash AgGrid for episode 1
ep1_grid = dag.AgGrid(
id = "ep1_grid",
rowData = ep1_df.to_dict("records"),
defaultColDef = {
"resizable": True,
"sortable": True,
"filter": True,
"sort": 'asc'
},
columnDefs = [
{
"field": i,
"type": "numericColumn",
"filter": "agNumberColumnFilter",
# Insert commas in the numeric columns
"valueFormatter": {"function": "d3.format(',.0f')(params.value)"},
"valueGetter": get_value_getter(i),
} if i in ep1_numeric_cols else {
"field": i,
"type": "textColumn",
"filter": "agTextColumnFilter",
"floatingFilter": True,
"suppressMenu": True,
"filterParams": {
"filterPlaceholder": "Search...",
},
} for i in ep1_df.columns
],
columnSize = "autoSize",
className = "ag-theme-alpine-dark",
)