0

Hey so I keep running into this problem where I want to load a dataset to work on it but it doesnt work. the file is CSV file. Two of my files dont work whereas another one of the file does. (Python beginner here)

I was trying to load the dataset but i kept running into errors. attached images. [enter image description here](https://i.stack.imgur.com/ZQibp.png) both datasets are located at the same place and both are csv files.

2 Answers2

2

As the error says, 'elite' is not one of the example datasets.

sns.load_dataset() loads one of the example datasets from the internet (see their documentation).

You can run sns.get_dataset_names() to see all available datasets.

If you have an elite.csv file stored locally on your machine, you might wanna try pandas.read_csv() here.

okost
  • 181
  • 9
-1
sns.load_dataset()

Loads datasets that are already included in seaborn repositories (using internet connection). You can see the full list using snsget_dataset_names(). (Documentation link).

If you want to import your own CSVs, you can use numpy or pandas.

Example:

import pandas as pd
data = pd.read_csv('your_file_name.csv')
farshad
  • 764
  • 10
  • 25