I have a dataframe in pandas
where I am using fuzzywuzzy
package in python to match first column in the dataframe with second column.
I have defined a function to create an output with first column, second column and partial ratio score. But it is not working.
Could you please help
import csv
import sys
import os
import numpy as np
import pandas as pd
from fuzzywuzzy import fuzz
from fuzzywuzzy import process
def match(driver):
driver["score"]=driver.apply(lambda row: fuzz.partial_ratio(row driver[driver.columns[0]], driver[driver.columns[1]]), axis=1)
print(driver)
return(driver)
Regards
-Abacus