In my sidebar, I have a multiselect widget to select states by membership. Selecting individual states works everywhere in my dashboard (some markdowns for KPI’s, a chloropleth, and some basic plots), but when I choose “Select All” nothing renders anywhere in the dashboard:
#state filter
state_list=dfNavi['State'].unique()
l2=[]
l2=state_list[:]
l2 = np.append('Select All', state_list)
state_dropdown = st.sidebar.multiselect('State:', l2)
if 'Select All' in state_dropdown:
state_dropdown = state_list
dfNavi = dfNavi.query("State==@state_dropdown")
The dataframe is groupby on a flat file that just sums up a few fields that leads to State-Date as the key.
Individual that works:
“Select All” that doesn’t work: