'How can I read this csv data?
I'm getting an error:
Error tokenizing data. C error: Expected 1 fields in line 88, saw 4
while trying to read this data:
import pandas as pd
df = pd.read_csv('https://github.com/owid/covid-19-data/blob/master/public/data/vaccinations/vaccinations.csv')
data = df.head()
I've tried with sep = ";" etc but it doesn't help. Any suggestions on how to solve this?
Solution 1:[1]
Looks like that you are pulling in the GitHub UI and not the csv with your link
https://github.com/owid/covid-19-data/blob/master/public/data/vaccinations/vaccinations.csv
Try this as this is the raw csv:
https://raw.githubusercontent.com/owid/covid-19-data/master/public/data/vaccinations/vaccinations.csv
Further as Thomas said, a CSV is a comma, as in (,
) separated file - not a semicolon (;
).
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |