Home > Enterprise >  Index mistake when using pandas read_csv
Index mistake when using pandas read_csv

Time:11-21

Whilst trying to import the popular enter image description here

How can I import the dataset (link) correctly from the URL using pandas read_csv ?

CodePudding user response:

You don't need to set the headers. It already comes with the headers in the CSV. The reason yours looks weird, is because you are missing 3 values in your headers list, which is why it's offset by 3.

CodePudding user response:

The following syntax shows a consistent result:

raw_dataset = pd.read_csv(url, sep=";")
  • Related