Hi I have a list and a pandas dataframe
[ apple, tomato, mango ]
values
tomato
pineapple
apple
banana
mango
I would like to replace the column values that appear in the list with the values in the new list as follow
[ fruit1, fruit2, fruit3 ]
My expected output is a pandas dataframe that looks like this
values
fruit2
pineapple
fruit1
banana
fruit3
How can I accomplish this efficiently?