Spaces:
Sleeping
Sleeping
Keith Bourne commited on
Commit ·
1a1eb00
1
Parent(s): cda3a79
Add google sheets connection
Browse files
.DS_Store
ADDED
|
Binary file (6.15 kB). View file
|
|
|
app.py
CHANGED
|
@@ -1,7 +1,17 @@
|
|
| 1 |
|
| 2 |
import streamlit as st
|
| 3 |
import pandas as pd
|
|
|
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
|
| 2 |
import streamlit as st
|
| 3 |
import pandas as pd
|
| 4 |
+
from streamlit_gsheets import GSheetsConnection
|
| 5 |
|
| 6 |
+
# Create a connection object.
|
| 7 |
+
conn = st.connection("gsheets", type=GSheetsConnection)
|
| 8 |
+
|
| 9 |
+
df = conn.read()
|
| 10 |
+
|
| 11 |
+
# Print results.
|
| 12 |
+
for row in df.itertuples():
|
| 13 |
+
st.write(f"{row.name} has a :{row.pet}:")
|
| 14 |
+
|
| 15 |
+
# st.title("Basic Streamlit App")
|
| 16 |
+
# name = st.text_input("Enter your name", '')
|
| 17 |
+
# st.write(f"Salutations {name}!")
|