|
import streamlit as st |
|
import pandas as pd |
|
|
|
def main(): |
|
|
|
st.title("Dashboard") |
|
|
|
|
|
with st.sidebar: |
|
options = ["Profile", "Statistics", "About"] |
|
option = st.selectbox("Select an option", options) |
|
|
|
|
|
if option == "Profile": |
|
profile = pd.DataFrame({ |
|
"Name": ["Hennifer Doe"], |
|
"Email": ["[email protected]"], |
|
"Location": ["San Francisco, CA"], |
|
}) |
|
st.dataframe(profile) |
|
|
|
|
|
elif option == "Statistics": |
|
statistics = pd.DataFrame({ |
|
"Number of Visitors": 1000, |
|
"Average Time Spent on Page": 2, |
|
"Bounce Rate": 10%, |
|
}) |
|
st.dataframe(statistics) |
|
|
|
|
|
else: |
|
about = """ |
|
This is a simple dashboard created with Streamlit. |
|
You can select an option from the sidebar to display different information. |
|
""" |
|
st.write(about) |
|
|
|
if __name__ == "__main__": |
|
main() |
|
|