Saturday May 27th 2017

Categories

Insider

Archives

Loading External Data into Scikit lear AKA SKLEARN

uciScikit learn comes with some toy datasets such as iris. We can load these with
from sklearn import neighbors, datasets
iris = datasets.load_iris()
print(iris)

However if we try to load any other external, for example I downloaded the wines data from uci we have to

We have to import pandas into SKlearn and then use the following command.
wine=pd.DataFrame.from_csv(‘C:\Data\wine.csv’, index_col=None, encoding=’utf-8′)
wine.head()