Working on a project here: https://desolate-ocean-14363.herokuapp.com/
I’m trying to python my way through as an easy button, but here’s the situation.
Restaurant names are selected, and the name is used to do a df.loc[‘name’] and pull up the stats for the restaurant. The problem is some restaurants show up more than once in a NYC borough, like “Sweet Chick”, and this will cause an error as pandas can’t pick just one. So I created an index for the data frame, and I want pandas to select the entry by index, but in the selectbox, to keep the user experience friendly, I want to retain the name.
Here’s what my dataframe looks like:
I was curious if you can think of a way to python around this, or are aware of any additional parameters to st.selectbox that i might not be aware of that will accept the name, as well as the index location.
Currently, I have it set up to populate the selectbox with a list of the restaurant names, and also as an experiment, to just use the restaurant name as index to populate the select box.
Github is here: https://github.com/hamiltonchangcodes/yelp_report_cards/tree/master/frontend
Thanks in advance!!