I have a dataframe column which I need to replace with categories defined in a dictionary.
I'm using a dictionary and using a for loop, under which there are if and elif statements with which I replace the values.
dict_col = {'Red':['Light_Red','Crimson','Ferrari_Red'],'Blue:['Light_Blue','Azure_Blue','Sky_Color']}
I wanted to know if there is a clean and better way to do this rather than using a for loop.
