Recent | Popular
#python #pandas #label #mapping
#Add the new column which gives a unique number to each of these labels df['label_num'] = df['label'].map({ 'Household' : 0, 'Books': 1, 'Electronics': 2, 'Clothing & Accessories': 3 }) #checking the results df.head(5)
Mon Sep 05 2022 09:44:22 GMT+0000 (Coordinated Universal Time)