Closed Helena1103 closed 6 years ago
To use indexes you need a DataFrame. Make sure the data that you work with is in a Pandas DataFrame. I it is already in a DataFrame, try to reindex the DataFrame
When you create the dataset for X and y, X is created as a pandas DataFrame, since it has more than one column, and y is created as a numpy array, since it has only one column. For DataFrame you need to use the df.iloc[number] if you want it to run through a loop of numbers.
ex. 13.1.3
KeyError: ['.., ,...'] not in index.
Someone who has solved the index problem in this exercise?