image_output_1.png
import matplotlib.pyplot as plt

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

train = pd.read_csv('../input/fashion-mnist_train.csv')

train.shape

test = pd.read_csv('../input/fashion-mnist_test.csv')

test.shape

class_names = ['T-shirt/top', 'Trouser', 'Pullover', 'Dress', 'Coat', 'Sandal', 'Shirt', 'Sneaker', 'Bag', 'Ankle boot']

train_images = train.iloc[:, 1:785]
train_labels = train.iloc[:, 0]
test_images = test.iloc[:, 1:785]
test_labels = test.iloc[:, 0]

plt.colorbar()
plt.xticks([])
plt.yticks([])

plt.colorbar()
plt.xticks([])
plt.yticks([])

train_images = train_images / 255.0
test_images = test_images / 255.0

for i in range(25):
    plt.xticks([])
    plt.yticks([])

train_images = train_images.values
train_labels = train_labels.values
test_images = test_images.values
test_labels = test_labels.values

plt.figure()
plt.imshow(test_images[0].reshape(28, 28))
plt.colorbar()
plt.xticks([])
plt.yticks([])
plt.show()