I have five checkboxes. When some of them are selected, I want my dataframe to be filtered on some specific condition. Additionally, values should be filtered with the AND logic. For example:
if filter1 & filter2: df = df .loc[(some condition of filter1) & (some condition of filter2)]
However, having five filters, I have to use a lot of different combinations to implement such logic (e.g. if filter1 & filter3, if filter1 & filter4, if filter1 & filter3 & filter4, and so on).
Is there is a more effective way to do it without going through all the filters combinations in if statements?
I checked this solution, however, it is applicable for sliders only as I understand it:
I would highly appreciate any help!