I wanted to make a dropdown that contain values from the response of a SQL query, it contains more than 35000 rows and its should searchable and selectable in a dropdown and based on that i want another dropdown to appear with a different query, i am very new to streamlit just wanted to know if this is possible, since this is a huge amount of data from SQL response
The quick solution here is instead of passing in advertiser_data to the selectbox, pass in advertiser_data["name"], so that the pandas Series is passed to the selectbox.
Separately, you might run into issues with having 35,000 rows in a drop-down. It’s not really a strong user experience either…is there a way you can do the top 1000 by occurrence, or have multiple drop-downs for people to hone in on which advertiser they are interested in?
Thanks @randyzwitch, advertiser[“name”] worked to pull advertiser_data without index and also in the format of rows, and as you suggested i tried dividing the rows of advertiser into smaller chunks using below code, but it not working, the get_advertisers() keeps on running without sending an data to streamlit, and in my case its not possible to have multiple dropdowns for people.