text_plain_output_2.png application_vnd.jupyter.stderr_output_1.png
import matplotlib.pyplot as plt

import numpy as np # linear algebra

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')

num_training = len(train.values)
num_testing = len(test.values)

y_train = np.array(train.pop('label').values)
x_train = np.array(train.values)
x_test = np.array(test.values)

x_train = x_train.reshape(num_training, 28, 28)
x_test = x_test.reshape(num_testing, 28, 28)

plt.figure(figsize=(11, 6))
for i in range(66):
    plt.subplot(6, 11, i + 1)
    plt.imshow(x_train[i])
    plt.xticks([])
    plt.yticks([])
plt.tight_layout()