text_plain_output_1.png
from tensorflow.keras.utils import to_categorical

import pandas as pd

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

train = pd.read_csv('/kaggle/input/digit-recognizer/train.csv')
test = pd.read_csv('/kaggle/input/digit-recognizer/test.csv')

(train.shape, test.shape)

X = train.drop('label', axis=1).values / 255.0
X = X.reshape(-1, 28, 28, 1)
X.shape

Y = train['label'].values
Y.shape

from tensorflow.keras.utils import to_categorical
Y = to_categorical(Y, num_classes=10)
Y.shape