I am trying to extract strings from a DF in pandas dataframe and the source strings are in a list from which I have to match. I tried using a df.str.extract(list1)
but i got an error of unhashable types i guess i the way I compare the list to the DF is not correct
From
Col 1 Col 2
1 The date
2 Three has come
3 Mail Sent
4 Done Deal
To
Col 1 Col 2 Col 3
1 The date NaN
2 Three has come Three has
3 Mail Sent Mail
4 Done Deal Done
My list is like below
List1 = ['Three has' , 'Mail' , 'Done' , 'Game' , 'Time has come']