A11
How to download a CSV file via API for the COVID Tracking Project / Ralph Turchiano

CODE:

import pandas as pd

import requests

response = requests.get(“https://covidtracking.com/api/v1/us/d…“)

covid = response.content

ccc = open(“daily.csv”,”wb”)

ccc.write(covid)

ccc.close()

df = pd.read_csv(“daily.csv”)

df.head()

Ralph Turchiano

By Ralph Turchiano

I have a strong affinity for the sciences which led me to create my sites. My compulsion for the past decade has been reviewing literally every peer-reviewed research article. Which can easily be validated by following my posts. To me, science is where the real news is, as it will mold our destiny beyond that of politics or economics. ;-)

Leave a Reply

Discover more from CLINICALNEWS.ORG

Subscribe now to keep reading and get access to the full archive.

Continue reading