I am currently trying to generate a table with multiple dropdown options (in a Jupiter Notebook). I have been able to create the scenario but the dropdown buttons work independently, meaning that if I select one dropdown from my 'Decision' dropdown with option 'A' and then select the other downtown 'Sex' with option 'Female' I either get option A or option 2 depending on the button last selected. However, what I really want is to have both filters applied at the same time. So I would get all Decisions 'A' that are 'Female' as filters for my table.
This is my code:
fig = go.Figure(go.Table(header={"values": df_dash.columns,'fill_color':'navy','align':'left',
'font':dict(color='white', size=12)},
cells={"values": df_dash.T.values,'fill_color':'white','align':'left'}))
fig.update_layout(
updatemenus=[
{
"y": 1 - (i / 5),
"buttons": [
{
"label": c,
"method": "restyle",
"args": [
{
"cells": {
"values": df_dash.T.values
if c == "All"
else df_dash.loc[df_dash[menu].eq(c)].T.values
}
}
],
}
for c in ["All"] + df_dash[menu].unique().tolist()
],
}
for i, menu in enumerate(["Decision", "Sex",])
]
)
And this is how it looks:

Any ideas what am I doing wrong or what can I add to make both buttons actively filtering my df table at the same time?