I have two data frames df1 and df2 as shown below:
Df1:
movie correct_id
0 birdman N/A
1 avengers: endgame N/A
2 deadpool N/A
3 once upon deadpool N/A
Df2: data frame of reference
movie correct_id
0 birdmans 4
1 The avengers: endgame 2
2 The King 3
3 once upon a deadpool 1
Expected Result:
movie correct_id
0 birdman 4
1 avengers: endgame 2
2 deadpool N/A
3 once upon deadpool 1
Please how do I merge two dataframes based on partial string match?
NB: The movie's name not exactly the same
fuzzywuzzyorrapidfuzzto compute string distance and take for each key indf1to key indf2that minimizes levenstein distance