Bring Drag & Drop to Dash with Dashboard Engine. 💫 Learn how at our next webinar!

Dropbox in table_experiments

Can you help me, please:
Im doing a small module for calculations using dash, there is a table in which the filtered data from pandas.dataframe is output. There is a list of 10 variables (a values from the dropbox) that are passed to the function. How to automate this search so that this condition (pseudocode) :
list = (a, b, c, d, e, f, g, h, i, j)

if a == a and (b is None or len(b) ==0) and (c is None or len© ==0) and … (j is None or len(j)== 0):
return df(df[df[a].isin(a)).to_dict(‘records’)

if a == a and b == b (c is None or len© ==0) and (d is None or len(d) ==0) and … (j is None or len(j)== 0):
return df[(df[a].isin(a)) &
(df[b].isin(b))].to_dict(‘records’)


if a == a and b == b and c == c … and i == i (c is None or len© ==0) and (d is None or len(d) ==0) and … (j is None or len(j)== 0):
return df[(df[a].isin(a)) &
(df[b].isin(b)) &
(df[c].isin©) &

(df[i].isin(i))].to_dict(‘records’)

Its look like, if you select a value from one dropbox, the dataframe is filtered by this value, the others are not taken into account; if two, then, respectively, filtered by these two values, the rest are not taken into account, etc.

Manually set for each a, b, c … this is more than 10!, which is exactly wrong.

No matter how I tried to use for i in list, but it does not wor a lot.