text_plain_output_1.png
import matplotlib.pyplot as plt

import numpy as np

import pandas as pd

train_data = pd.read_csv('../input/digit-recognizer/train.csv')
test_data = pd.read_csv('../input/digit-recognizer/test.csv') / 255

plt.figure(figsize=(8, 8))
for i in range(9):
    img = np.asarray(train_data.iloc[i + 180, 1:].values.reshape((28, 28)) / 255)
    ax = plt.subplot(3, 3, i + 1)
    ax.grid(False)
    ax.get_xaxis().set_visible(False)
    ax.get_yaxis().set_visible(False)
    ax.title.set_text(f'{train_data.iloc[i + 18, 0]}')
    plt.imshow(img, cmap='gray')
plt.show()