File size: 1,099 Bytes
33a2172
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4cfd05a
0bd2ab5
33a2172
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import streamlit as st
import pandas as pd

def main():
  # Create a title for the dashboard
  st.title("Dashboard")

  # Create a sidebar with a dropdown menu
  with st.sidebar:
    options = ["Profile", "Statistics", "About"]
    option = st.selectbox("Select an option", options)

  # Display the profile information if the user selects "Profile"
  if option == "Profile":
    profile = pd.DataFrame({
      "Name": ["Hennifer Doe"],
      "Email": ["[email protected]"],
      "Location": ["San Francisco, CA"],
    })
    st.dataframe(profile)

  # Display the statistics if the user selects "Statistics"
  elif option == "Statistics":
    statistics = pd.DataFrame({
      "Number of Visitors": 1000,
      "Average Time Spent on Page": 2,
      "Bounce Rate": 10%
    })
    st.dataframe(statistics)

  # Display the about information if the user selects "About"
  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()