Hello everybody, I am new with streamlit, I have a question how can I change the error message ValueError: to a custom one?
I have a chain of 5 selections where you select states, cities and elements in the cities, then there are elements that are not in these cities so it generates some errors with certain combinations of selection
data= data_5.loc[data_5['City'] == select_city]
select_brand = st.selectbox('Select a brand of stores for this city', options=pd.unique(data_5_fil['Brand']))
data_5_cad = data_5_fil.loc[data_5_fil['Brand'] == select_Brand]
select_categ = st.selectbox('Select a product category', options=pd.unique(data_5_cad['Categ']))
data_5_cat = data_5_cad.loc[data_5_cad['Categ'] == select_categ]
select_subcateg = st.selectbox('Select a sub-category', options=pd.unique(data_5_cat['SubCateg']))
data_5_subcat = data_5_cat.loc[data_5_cat['SubCateg'] == select_subcateg]