Snippets Collections
#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)

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension