Keith Bourne commited on
Commit
698e514
·
1 Parent(s): 8ff33ee

Add google sheets code

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -1,20 +1,20 @@
1
 
2
  import streamlit as st
3
  import pandas as pd
4
- # from streamlit_gsheets import GSheetsConnection
5
  import os
6
 
7
  # typestring = os.environ['type']
8
  # st.write(f"type :{typestring}")
9
 
10
- # Create a connection object.
11
- # conn = st.connection("gsheets", type=GSheetsConnection)
12
 
13
- # df = conn.read()
14
 
15
- # # Print results.
16
- # for row in df.itertuples():
17
- # st.write(f"{row.name} has a :{row.pet}:")
18
 
19
  st.title("Basic Streamlit App")
20
  name = st.text_input("Enter your name", '')
 
1
 
2
  import streamlit as st
3
  import pandas as pd
4
+ from streamlit_gsheets import GSheetsConnection
5
  import os
6
 
7
  # typestring = os.environ['type']
8
  # st.write(f"type :{typestring}")
9
 
10
+ Create a connection object.
11
+ conn = st.connection("gsheets", type=GSheetsConnection)
12
 
13
+ df = conn.read()
14
 
15
+ # Print results.
16
+ for row in df.itertuples():
17
+ st.write(f"{row.name} has a :{row.pet}:")
18
 
19
  st.title("Basic Streamlit App")
20
  name = st.text_input("Enter your name", '')