Opa,
Não consigo sair da fase inicial do curso.
import streamlit as st
import requests
import pandas as pd
import plotly.express as px
st.title('DASHBOARD DE VENDAS :shopping_trolley:')
url = 'https://labdados.com/produtos'
response = requests.get(url)
dados = pd.DataFrame.from_dict(response.json())
st.DataFrame(dados)
No terminal:
You can now view your Streamlit app in your browser.
Local URL: http://localhost:8501
Network URL: http://192.168.0.42:8501
2024-01-09 18:49:57.388 Uncaught app exception
Traceback (most recent call last):
File "C:\scripts\dashboard_streamlit\venv\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 534, in _run_script
exec(code, module.__dict__)
File "C:\scripts\dashboard_streamlit\Dashboard.py", line 12, in <module>
st.DataFrame(dados)
AttributeError: module 'streamlit' has no attribute 'DataFrame'
2024-01-09 18:50:16.997 Uncaught app exception
Traceback (most recent call last):
File "C:\scripts\dashboard_streamlit\venv\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 534, in _run_script
exec(code, module.__dict__)
File "C:\scripts\dashboard_streamlit\Dashboard.py", line 12, in <module>
st.DataFrame(dados)
AttributeError: module 'streamlit' has no attribute 'DataFrame'