Skip to content

Instantly share code, notes, and snippets.

@alanjones2
Last active June 2, 2022 10:58
Show Gist options
  • Save alanjones2/015c8826bb7f17aa2fa63bc24c45fa69 to your computer and use it in GitHub Desktop.
Save alanjones2/015c8826bb7f17aa2fa63bc24c45fa69 to your computer and use it in GitHub Desktop.
import streamlit as st
import pandas as pd
import plotly.express as px
st.set_page_config(layout="wide")
df = pd.DataFrame(px.data.gapminder())
def countryData():
# Countries code goes here
def continentData():
# Continents code goes here
st.header("National Statistics")
page = st.sidebar.selectbox('Select page',['Country data','Continent data'])
if page == 'Country data':
countryData()
else:
continentData()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment