text_html_output_1.png
import pandas as pd

data = pd.read_csv('/kaggle/input/autompg-dataset/auto-mpg.csv', na_values='?', comment='\t', skipinitialspace=True)
data

df_c = data['car name'].astype('category')

data['car name'] = df_c.cat.codes
data['car name']