0

I am attempting to load a dataset using the seaborn function "load_dataset" but i keep encountering IndexError:single positional indexer is out-of-bounds

import numpy as np
import pandas as pd
from numpy.random import randn
import matplotlib as mpl
import matplotlib.pyplot as plt
import seaborn as sms
from scipy import stats

df = sms.load_dataset('gapminder-FiveYearData.csv')

print df
IndexError: single positional indexer is out-of-bounds
lczapski
  • 4,026
  • 3
  • 16
  • 32
padonu
  • 1
  • 2
  • It looks like your CSV element count in lines is not constant. Check that there are no random unescaped comma in the file – Simas Joneliunas Nov 14 '19 at 08:07
  • I would love to, but the data is much. take a look at the data here https://raw.githubusercontent.com/resbaz/r-novice-gapminder-files/master/data/gapminder-FiveYearData.csv – padonu Nov 14 '19 at 08:27
  • 1
    It appears that the issue is with how seaborn's load dataset function works. It does not accept local files as shown in this issue: https://stackoverflow.com/questions/30336324/seaborn-load-dataset – Simas Joneliunas Nov 14 '19 at 08:52

0 Answers0