I have two strings in dataframe. I need to check if any word from string2 is included in string1. ORIGINAL
I am using this split and it does not work.
((df['string1'].split()).eq(df['string2'].split())).any()
after running the code, it should return like this RESULT
I tried simple method and it works >>
TXT = 'HELLO WORLD, I AM TESTING'
TXT2 = 'HELLO TESTING'
X = TXT.split()
Y = TXT2.split()
any(i in X for i in Y)
--> python return "TRUE"
I don't know how to do this in dataframe and write additional column for the result