Breaking News

a11

How to download a CSV file via API for the COVID Tracking Project

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()

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%
%d bloggers like this: