I created a table using Python Dash DataTable and added a filter to each column. The data table looks like this:
Text_Column Numeric_Column
abcde 12345
dfjke 34928
Each column has a filter but it seems like the filter works only when the column has text values. It's not working for the numeric column. How do I make it to work for both text and numeric columns?
dash_table.DataTable(
id="table",
columns=[
{"name": i, "id": i} for i in df.columns
],
data=df.to_dict('records'),
filter_action="native",
sort_action="native",
style_table={
"overflowX": "scroll",
},
row_selectable="multi",
style_cell={
"height": "auto",
"maxWidth": "200px",
"whiteSpace": "normal",
"font-family": "Arial",
'textAlign': 'center',
},
)
),