0

For example the following example code from this answer throws the following error: "ParserError: Error tokenizing data. C error: Expected 1 fields in line 6, saw 2"

url='https://drive.google.com/file/d/0B6GhBwm5vaB2ekdlZW5WZnppb28/view?usp=sharing'
url2='https://drive.google.com/uc?id=' + url.split('/')[-2]
df = pd.read_csv(url2)

It seems to be trying to load the html or something. Maybe I'm doing something stupid or maybe pandas updated something in a new version? Much obliged to any insight! Thanks.

enter image description here

patwater
  • 31
  • 1
  • 2
  • It loads HTML because your URL feeds it HTML – mozway Sep 16 '21 at 18:42
  • Soooooooooo if you plug in url2 it's the csv download from google drive which is usually the format that worked in teh past and was used in the other StackOverflow answer I linked – patwater Sep 16 '21 at 20:41

0 Answers0