Last active
September 8, 2022 02:39
-
-
Save toyeiei/3fa5e4f7a305de760502b75e6456f6ce to your computer and use it in GitHub Desktop.
streamlit_basic_app_toy_2022SEP08
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import streamlit as st | |
import pandas as pd | |
st.header("Hello World 👏") | |
st.write("This is my first app") | |
url = "https://raw.githubusercontent.com/mwaskom/seaborn-data/master/penguins.csv " | |
df = pd.read_csv(url) | |
df2 = df.groupby('species')['body_mass_g'].mean() | |
st.bar_chart(df2) | |
genre = st.radio( | |
"What's your favorite movie genre", | |
('Comedy', 'Drama', 'Documentary')) | |
if genre == 'Comedy': | |
st.write('You selected comedy.') | |
elif genre == 'Drama': | |
st.write('You selected drama.') | |
else: | |
st.write("Wow! You like documentary.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment