-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.py
More file actions
88 lines (55 loc) · 1.81 KB
/
Copy pathtest.py
File metadata and controls
88 lines (55 loc) · 1.81 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import streamlit as st #all streamlit commands will be available through the "st" alias
import pandas as pd
import numpy as np
st.set_page_config(page_title="POOR6", layout="wide") #set the page width wider to accommodate columns
st.title("POOR6") #page title
st.markdown("markdown")
st.header("header")
st.subheader("subheader")
st.caption("caption")
st.code("code")
st.divider()
col1, col2, col3 = st.columns(3)
col1.metric("Temperature", "70 °F", "1.2 °F")
col2.metric("Wind", "9 mph", "-8%")
col3.metric("Humidity", "86%", "4%")
st.divider()
df = pd.DataFrame({
"col1": np.random.randn(1000) / 50 + 37.76,
"col2": np.random.randn(1000) / 50 + -122.4,
"col3": np.random.randn(1000) * 100,
"col4": np.random.rand(1000, 4).tolist(),
})
st.map(df,
latitude='col1',
longitude='col2',
size='col3',
color='col4')
st.divider()
options = st.multiselect(
'What are your favorite colors',
['Green', 'Yellow', 'Red', 'Blue'],
['Yellow', 'Red'])
st.write('You selected:', options)
st.divider()
st.bar_chart({"data": [1, 5, 2, 6, 2, 1]})
with st.expander("See explanation"):
st.write("The chart above shows some numbers I picked for you. I rolled actual dice for these, so they're *guaranteed* to be random.")
st.image("https://static.streamlit.io/examples/dice.jpg")
st.divider()
st.divider()
with st.container():
col1, col2, col3 = st.columns(3)
col11, col22 = st.columns(2)
with col1:
st.write("col1")
with col2:
st.write("col2")
with col3:
st.write("col3")
with col11:
st.write("col11")
with col22:
st.write("col22")
st.divider()
st.markdown("<h1 style='text-align: center; color: red;'>Some title</h1>", unsafe_allow_html=True)