Update app.py
Browse files
app.py
CHANGED
@@ -20,10 +20,9 @@ def get_data():
|
|
20 |
data = response.json()
|
21 |
|
22 |
if 'data' in data:
|
23 |
-
keys = data['data'][0].keys()
|
24 |
-
st.write(keys) # Print out the keys in the first data point
|
25 |
-
|
26 |
try:
|
|
|
|
|
27 |
df = pd.DataFrame(data['data'])
|
28 |
# Adjust the key based on the actual keys in the data dictionary
|
29 |
timestamp_key = 'time' if 'time' in keys else 'open_time'
|
|
|
20 |
data = response.json()
|
21 |
|
22 |
if 'data' in data:
|
|
|
|
|
|
|
23 |
try:
|
24 |
+
keys = data['data'][0].keys()
|
25 |
+
st.write(keys) # Print out the keys in the data
|
26 |
df = pd.DataFrame(data['data'])
|
27 |
# Adjust the key based on the actual keys in the data dictionary
|
28 |
timestamp_key = 'time' if 'time' in keys else 'open_time'
|