text_plain_output_1.png
from sklearn.neighbors import KNeighborsClassifier

from sklearn.utils import shuffle

import pandas as pd

df = pd.read_csv('../input/glass.csv')

from sklearn.utils import shuffle
df = shuffle(df)

X = df.ix[:, :-1]
Y = df.ix[:, -1]

xtest = X.ix[:100,]
ytest = Y.ix[:100,]
xtrain = X.ix[100:,]
ytrain = Y.ix[100:,]

KNClassifier = KNeighborsClassifier()
KNClassifier.fit(xtrain, ytrain)