I have 2 lists and would like to have matches from list_2 replace the entire string in list_1.
list_1
0 Univ Miami, Sch Med, Miami Project Cure Paralysis
1 Sch Med, Dept Neurol Chicago Surg,
2 Univ London, Sch Med, Dept Physiol & Biophys
list_2
0 New York
1 Chicago
2 London
3 Miami
...
Using something like list_1.replace('(?i)(Miami)', 'test', regex = True) I can only replace 'Miami' with 'test' but can not use list_2 as input pattern nor replace the entire string with the match.
What I would like to get as a result is:
list_1
0 Miami
1 Chicago
2 London
I hope that makes sense, Thanks in advance