sajjadyazdanparast commited on
Commit
91134f0
1 Parent(s): 96c806c

UPDATE app.py to also display data[Fframe

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -2,6 +2,8 @@ import streamlit as st
2
  import os
3
  import matplotlib.pyplot as plt
4
  import requests
 
 
5
 
6
  st.set_page_config(
7
  page_title='DataBoard' ,
@@ -15,5 +17,9 @@ def get_json_response(url:str) :
15
  response = requests.get(url)
16
  return response.json()
17
 
 
 
 
18
 
19
- st.json(get_json_response(url), expanded=False)
 
 
2
  import os
3
  import matplotlib.pyplot as plt
4
  import requests
5
+ import pandas as pd
6
+
7
 
8
  st.set_page_config(
9
  page_title='DataBoard' ,
 
17
  response = requests.get(url)
18
  return response.json()
19
 
20
+ st.subheader('Json')
21
+ st.json(get_json_response(url), expanded=False)
22
+ "----"
23
 
24
+ st.subheader('DataFrame')
25
+ st.dataframe(pd.DataFrame.from_dict(dict(get_json_response(url))['quotes']))