text_html_output_1.png
from sklearn.preprocessing import OneHotEncoder

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

train_data = pd.read_csv('../input/train.csv')
test_data = pd.read_csv('../input/test.csv')

y_train = train_data['label']

from sklearn.preprocessing import OneHotEncoder
encoder = OneHotEncoder()
Y_train = encoder.fit_transform(y_train.values.reshape(-1, 1))
Y_train = Y_train.toarray()