forked from streamlit/streamlit-example
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtimestream.py
More file actions
37 lines (30 loc) · 978 Bytes
/
timestream.py
File metadata and controls
37 lines (30 loc) · 978 Bytes
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
import streamlit as st
import awswrangler as wr
import pandas as pd
from datetime import datetime
st.title('Timestream Demo - Work in progress')
#df = pd.read_csv(
# "https://raw.githubusercontent.com/awslabs/amazon-timestream-tools/mainline/sample_apps/data/sample.csv",
# names=[
# "ignore0",
# "region",
# "ignore1",
# "az",
# "ignore2",
# "hostname",
# "measure_kind",
# "measure",
# "ignore3",
# "ignore4",
# "ignore5",
# ],
# usecols=["region", "az", "hostname", "measure_kind", "measure"],
#)
#df["time"] = datetime.now()
#df.reset_index(inplace=True, drop=False)
df = {
"regions": ['us-gov-west-1', 'ap-northeast-1', 'ap-southeast-2','eu-central-1', 'eu-west-1', 'us-east-1','us-east-2','us-west-2']
}
st.dataframe(df)
#wr.timestream.create_database("sampleDB")
#wr.timestream.create_table("sampleDB", "sampleTable", memory_retention_hours=1, magnetic_retention_days=1)