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

train = pd.read_csv('../input/train.csv')

test = pd.read_csv('../input/test.csv')

x_train = train[:, 1:].values.astype('float32')
y_train = train[:, 0].values.astype('int32')
x_test = test.values.astype('float32')

x_train.shape

x_train = x_train.reshape(x_train.shape[0], 28, 28)

x_train.shape

x_train = x_train.reshape(x_train.shape[0], 28, 28, 1)
x_test = x_test.reshape(x_test.shape[0], 28, 28, 1)

(x_train.shape, x_test.shape)