I have a series that has nearly 4,000 different strings, along with a data frame with two series. I am trying to iterate through each string, find words that match in those strings to any of the words in the second series of the other data frame. If they match, then replace the word in the string, from the series, with the word from the first series in the data frame.
Here's an example of what I'm trying to do.
Example string that's split to a list.
0 [I, like, the, acura, vigor]
The data frame.
acura integra
0 acura legend
1 acura vigor
2 acura rlx
3 acura ilx
4 acura mdx
So, that string would replace 'vigor' with 'acura'.
[I, like, the, acura, acura]