image_output_1.png
import numpy as np

import pandas as pd

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

x_train = train.iloc[:, 1:].values / 255.0
y_train = train.iloc[:, 0].values
x_test = test.values / 255

x_train = np.reshape(x_train, (-1, 1, 28, 28))
x_test = np.reshape(x_test, (-1, 1, 28, 28))
(x_train.shape, x_test.shape)