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

df = pd.read_csv('/kaggle/input/tmnist-typeface-mnist/TMNIST_data.csv')

unique_typefaces = df.names.unique()
typeface_map = {}
for i in range(len(unique_typefaces)):
    typeface_map[unique_typefaces[i]] = i
df = df.replace({'names': typeface_map})
df.head()