Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

streamlit dropdown

Host_Country = st.selectbox('Select HomeTeamName name:',('France', 'Spain', 'Italy', 'England', 'Belgium', 'Portugal','Sweden'))
st.write('You selected:', Host_Country)
Comment

streamlit dropdown

# Add selectbox in streamlit
>>> option = st.selectbox(
...     'How would you like to be contacted?',
...     ('Email', 'Home phone', 'Mobile phone'))
>>>
>>> st.write('You selected:', option)
Comment

streamlit dropdown

url = "https://covid.ourworldindata.org/data/owid-covid-data.csv"
data = get_data(url)

locations = data.location.unique().tolist()

sidebar = st.sidebar
location_selector = sidebar.selectbox(
    "Select a Location",
    locations
)
st.markdown(f"# Currently Selected {location_selector}")

daily_cases = data.groupby(pd.Grouper(key="date", freq="1D")).aggregate(new_cases=("new_cases", "sum")).reset_index()
fig = daily_cases.iplot(kind="line", asFigure=True, 
                        x="date", y="new_cases")
st.plotly_chart(fig)
Comment

PREVIOUS NEXT
Code Example
Python :: print list vertically in python with loop 
Python :: generate random integer matrix python 
Python :: discord.py get a bot online 
Python :: python insert image 
Python :: how to take two integers as input in python 
Python :: Remove the First Character From the String in Python Using the Slicing 
Python :: ImportError: cannot import name ABC 
Python :: fetch python 
Python :: find all unique items in dictionary value python 
Python :: install log21 python 
Python :: scientific notation to decimal python 
Python :: get index of element in numpy array python 
Python :: seconds in a month 
Python :: python parse json file 
Python :: update windows wallpaper python 
Python :: How to convert text into audio file in python? 
Python :: saving a pandas dataframe as a csv 
Python :: rename files in folder python 
Python :: pandas plot distribution 
Python :: python how to remove the title of the index from dataframe 
Python :: flask api response code 
Python :: union df pandas 
Python :: change text color docx-python 
Python :: how to draw polygon in tkinter 
Python :: python download file from web 
Python :: how to reapete the code in python 
Python :: how to split string with comma in python 
Python :: read_csv Unnamed: 0 
Python :: how to parse dicts in reqparse in flask 
Python :: download kaggle dataset in colab 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =