import requests
url ="https://financialmodelingprep.com/api/v3/profile/AAPL?apikey=demo"
data = requests.get(url).json()
data_pd = pd.DataFrame(data)
if data_pd["price"] >= data_pd["dcf"]:
I get an error on the very last line. I don't understand why this is throwing an error because I am just comparing the header value and there is only one possible value for "price" and "dcf".
Aucun commentaire:
Enregistrer un commentaire