You’re super close! Just two things:
-
filter_query
only applies tostyle_data_conditional
, notstyle_cell_conditional
(which also covers the headers) - It’s an array of objects, not just one object
DataTable(
data=data.to_dict('rows'),
columns=[{'id': c, 'name': c} for c in data.columns],
style_as_list_view=True,
style_cell={'fontSize': 15},
style_data_conditional=[{
'if': {
'column_id': 'param_2',
'filter_query': '{param_2} eq 3'
},
'backgroundColor': 'rgb(255,0,0)'
}],
)