Skip to content

Instantly share code, notes, and snippets.

@toyeiei
Last active September 8, 2022 02:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save toyeiei/3fa5e4f7a305de760502b75e6456f6ce to your computer and use it in GitHub Desktop.
Save toyeiei/3fa5e4f7a305de760502b75e6456f6ce to your computer and use it in GitHub Desktop.
streamlit_basic_app_toy_2022SEP08
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