text_plain_output_1.png
import numpy as np

import numpy as np # linear algebra

import pandas as pd

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

import pandas as pd
import numpy as np
data = pd.read_csv('../input/digit-recognizer/train.csv')
X = data.drop('label', axis=1).values
s = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
one_hot = pd.get_dummies(s)
one_hot['label'] = one_hot.index
data = pd.merge(data, one_hot)
data = data.sample(frac=1)
data = data.drop('label', axis=1)
y = np.array(data[[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]].values)
X = np.array(data.drop([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], axis=1).values)
X = X.T
y = y.T
print(X.shape)
print(y.shape)