I am trying to find all matched words from a column of strings and a giving word list. If I use pandas str.extract(), I can get the first matched word, since I needs all the matched words, so I think pandas str.extractall() will work, however, I only got an ValueError. what will the problem be here? Thanks so much!
df['findWord'] = df['text'].str.extractall(f"({'|'.join(wordlist)})").fillna('')
ValueError: Buffer dtype mismatch, expected 'Python object' but got 'long long'