I am trying just to read a dataset which is in a drive in csv format, but I keep getting the error:
“ParserError: Error tokenizing data. C error: Expected 1 fields in line 3, saw 1287”
This is my code, is really basic:
<code>import pandas as pd
url = 'https://drive.google.com/file/d/1rDc9LKvnVjWyldo6N3UN0D4nMAxId47L/view?usp=drive_link'
df = pd.read_csv(url)
print(df.head())
</code>
<code>import pandas as pd
url = 'https://drive.google.com/file/d/1rDc9LKvnVjWyldo6N3UN0D4nMAxId47L/view?usp=drive_link'
df = pd.read_csv(url)
print(df.head())
</code>
import pandas as pd
url = 'https://drive.google.com/file/d/1rDc9LKvnVjWyldo6N3UN0D4nMAxId47L/view?usp=drive_link'
df = pd.read_csv(url)
print(df.head())
It shows that in the line of reading the url is where I have the problem.
I wanted to see the first rows of the dataset.
New contributor
SantiaCODE_ is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.