fuzzywuzzy's process.extract() returns the list in reverse sorted order , with the best match coming first.

so to find just the best match, you can set the limit argument as 1 , so that it only returns the best match, and if that is greater than 60 , you can write it to the csv, like you are doing now.

Example -

from fuzzywuzzy import process
## For each row in the lookup compute the partial ratio
for row in parse_csv("names_2.csv"):

    for found, score, matchrow in process.extract(row, data, limit=1):
        if score >= 60:
            print('%d%% partial match: "%s" with "%s" ' % (score, row, found))
            Digi_Results = [row, score, found]
            writer.writerow(Digi_Results)
Answer from Anand S Kumar on Stack Overflow
🌐
PyPI
pypi.org › project › fuzzywuzzy
fuzzywuzzy · PyPI
>>> process.extractOne("System of a down - Hypnotize - Heroin", songs) ('/music/library/good/System of a Down/2005 - Hypnotize/01 - Attack.mp3', 86) >>> process.extractOne("System of a down - Hypnotize - Heroin", songs, scorer=fuzz.token_sort_ratio) ("/music/library/good/System of a Down/2005 - Hypnotize/10 - She's Like Heroin.mp3", 61) FuzzyWuzzy is being ported to other languages too!
      » pip install fuzzywuzzy
    
Published   Feb 13, 2020
Version   0.18.0
🌐
GitHub
github.com › seatgeek › fuzzywuzzy › blob › master › fuzzywuzzy › process.py
fuzzywuzzy/fuzzywuzzy/process.py at master · seatgeek/fuzzywuzzy
August 26, 2024 - best_list = extractWithoutOrder(query, ...fault_processor, scorer=default_scorer, score_cutoff=0): """Find the single best match above a score in a list of choices....
Author   seatgeek
🌐
ProgramCreek
programcreek.com › python › example › 88084 › fuzzywuzzy.process.extractOne
Python Examples of fuzzywuzzy.process.extractOne
You may also want to check out all available functions/classes of the module fuzzywuzzy.process , or try the search function . ... def params_dict(self): """ function to get params dict for HTTP request """ location_code = 'US' language_code = 'en' if len(self.location): location_code = locationMap[process.extractOne(self.location, self.locations)[0]] if len(self.language): language_code = langMap[process.extractOne(self.language, self.languages)[0]] params = { 'hl': language_code, 'gl': location_code, 'ceid': '{}:{}'.format(location_code, language_code) } return params
🌐
Rdrr.io
rdrr.io › cran › fuzzywuzzyR › man › FuzzExtract.html
FuzzExtract: Fuzzy extraction from a sequence in fuzzywuzzyR: Fuzzy String Matching
September 9, 2025 - a function for scoring matches between the query and an individual processed choice. This should be a function of the form f(query, choice) -> int. By default, FuzzMatcher.WRATIO() is used and expects both query and choice to be strings. See the examples for more details.
🌐
Snyk
snyk.io › advisor › fuzzywuzzy › functions › fuzzywuzzy.process.extract
How to use the fuzzywuzzy.process.extract function in fuzzywuzzy | Snyk
* (git_line_summary_path is None)) data = [' '.join(line.strip().split()[1:-1]) for line in lines if '%' in line] # load zenodo from master zenodo_file = Path('.zenodo.json') zenodo = json.loads(zenodo_file.read_text()) zen_names = [' '.join(val['name'].split(',')[::-1]).strip() for val in zenodo['creators']] total_names = len(zen_names) + len(MISSING_ENTRIES) name_matches = [] position = 1 for ele in data: matches = process.extract(ele, zen_names, scorer=fuzz.token_sort_ratio, limit=2) # matches is a list: # [('First match', % Match), ('Second match', % Match)] if matches[0][1] > 80: val = zenodo['creators'][zen_names.index(matches[0][0])] else: # skip unmatched names print("No entry to sort:", ele) continue if val not in name_matches: if val['name'] not in CREATORS_LAST: val['position'] = position position += 1 else: val['position'] = total_names + \
Top answer
1 of 3
21

The other answer is wrong in a key respect - the inference that the result of process.extract was the same as fuzz.partial_ratio in one case, therefore they are doing the same thing by default.

process.extract actually uses WRatio() by default, which is a weighted combination of the four fuzz ratios. This is actually a cool functionality that empirically works pretty well across fuzzy matching scenarios.

Still, you can manually specify the string comparison function via the scorer argument to extract

Source for process.extract:https://github.com/seatgeek/fuzzywuzzy/blob/master/fuzzywuzzy/process.py

2 of 3
9

There are four ratio in fuzzywuzzy comparison.

  • base_ratio: The Levenshtein Distance of two string.
  • partial_ratio: The ratio of most similar substring.
  • token_sort_ratio: Measure of the sequences' similarity sorting the token before comparing.
  • token_set_ratio: Find all alphanumeric tokens in each string.

More details on ration can be found here http://chairnerd.seatgeek.com/fuzzywuzzy-fuzzy-string-matching-in-python/

By default process.extract() use Partial_ratio for comparison, but you can also override it with third parameter to process.extract()

Ex.

print(fuzz.partial_ratio('Total replenishment lead time (in workdays)', 'Lead_time_planning'))
query = 'Total replenishment lead time (in workdays)'
choices = ['PLANNING_TIME_FENCE_CODE', 'BUILD_IN_WIP_FLAG','Lead_time_planning']
print(process.extract(query, choices))

Results will be :

50
[('Lead_time_planning', 50), ('PLANNING_TIME_FENCE_CODE', 38), ('BUILD_IN_WIP_FLAG', 26)]

Which shows it is by default using partial_ratio, which you can override anytime.

🌐
GitHub
github.com › seatgeek › fuzzywuzzy › issues › 165
Return index with extract one process · Issue #165 · seatgeek/fuzzywuzzy
June 21, 2017 - Hi, From what I can see in fuzzywuzzy/fuzzywuzzy/process.py - extract functions return only the match and its score if the provided iterable is not dictionary. When we pass the series, its really required to know the actual index of the match ...
Author   seatgeek
🌐
Snyk
snyk.io › advisor › fuzzywuzzy › functions › fuzzywuzzy.process.extractone
How to use the fuzzywuzzy.process.extractOne function in fuzzywuzzy | Snyk
if fuzzy: try: from fuzzywuzzy import process except ImportError: raise ImportError("Fuzzy column name matching requires " "`fuzzywuzzy`. Install with pip install " "fuzzywuzzy.") # FUTURETODO: could make this customizable too... score_thresh = 90 matches = [] scores = [] for name in _valid_rv_names: match, score = process.extractOne(name, lwr_cols) matches.append(match) scores.append(score) scores = np.array(scores) matches = np.array(matches) # error if the best match is below threshold if scores.max() < score_thresh: raise RuntimeError("Failed to parse radial velocity data from " "input table: No column names looked " "good with fuzzy name matching.") # check for multiple bests: if np.sum(scores == scores.max()) > 1: raise RuntimeError("Failed to parse radial velocity data from " "input table: Multiple column names looked " "good with fuzzy matching {}."
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › python › fuzzywuzzy-python-library
FuzzyWuzzy Python Library - GeeksforGeeks
January 9, 2026 - query = 'geeks for geeks' choices = ['geek for geek', 'geek geek', 'g. for geeks'] process.extract(query, choices) process.extractOne(query, choices) WRatio is an advanced ratio that gives a more accurate similarity score, handling case and minor differences. Python · fuzz.WRatio('geeks for geeks', 'Geeks For Geeks') fuzz.WRatio('geeks for geeks!!!','geeks for geeks') fuzz.ratio('geeks for geeks!!!','geeks for geeks') Python · from fuzzywuzzy import fuzz from fuzzywuzzy import process s1 = "I love GeeksforGeeks" s2 = "I am loving GeeksforGeeks" print("FuzzyWuzzy Ratio: ", fuzz.ratio(s1, s2))
🌐
CRAN
cran.r-project.org › web › packages › fuzzywuzzyR › vignettes › functionality_of_fuzzywuzzyR_package.html
Functionality of the fuzzywuzzyR package
Information about the additional parameters (limit, score_cutoff and threshold) can be found in the package documentation, library(fuzzywuzzyR) word = "new york jets" choices = c("Atlanta Falcons", "New York Jets", "New York Giants", "Dallas Cowboys") #------------ # processor : #------------ init_proc = FuzzUtils$new() # initialization of FuzzUtils class to choose a processor PROC = init_proc$Full_process # processor-method PROC1 = tolower # base R function ( as an example for a processor ) #--------- # scorer : #--------- init_scor = FuzzMatcher$new() # initialization of the scorer class SCOR = init_scor$WRATIO # choosen scorer function init <- FuzzExtract$new() # Initialization of the FuzzExtract class init$Extract(string = word, sequence_strings = choices, processor = PROC, scorer = SCOR)
🌐
Towards Data Science
towardsdatascience.com › home › latest › string matching with fuzzywuzzy
String Matching With FuzzyWuzzy | Towards Data Science
January 28, 2025 - Similarly to the extract function, you can also use the process module to only extract one string with the highest similarity score by calling the extractOne() function.
🌐
CRAN
cran.r-project.org › web › packages › fuzzywuzzyR › fuzzywuzzyR.pdf pdf
Package ‘fuzzywuzzyR’ May 8, 2026 Type Package Title Fuzzy String Matching
ExtractWithoutOrder(string = NULL, sequence_strings = NULL, processor = NULL, scorer = NULL, score_cutoff ... ExtractOne(string = NULL, sequence_strings = NULL, processor = NULL, scorer = NULL, score_cutoff = 0L)
🌐
LinkedIn
linkedin.com › pulse › let-data-work-you-thefuzz-fuzzywuzzy-resat-caner-bas
Let the Data Work for You: thefuzz (fuzzywuzzy)
September 4, 2023 - How: Simply apply fuzzy matching with thefuzz.process.extract() or thefuzz.process.extractOne() to find the best match for your customer records.
🌐
GitHub
github.com › seatgeek › fuzzywuzzy
GitHub - seatgeek/fuzzywuzzy: Fuzzy String Matching in Python · GitHub
August 26, 2024 - Fuzzy String Matching in Python. Contribute to seatgeek/fuzzywuzzy development by creating an account on GitHub.
Starred by 9.3K users
Forked by 859 users
Languages   Python 91.7% | Shell 8.3%
🌐
GitHub
github.com › seatgeek › fuzzywuzzy › pull › 252 › files
Add process.extractBests example by elena · Pull Request #252 · seatgeek/fuzzywuzzy
August 26, 2024 - git+ssh://git@github.com/seatgeek/fuzzywuzzy.git@0.17.0#egg=fuzzywuzzy · Manually via GIT · .. code:: bash · Expand Down · Expand Up · @@ -109,13 +109,16 @@ Process · >>> choices = ["Atlanta Falcons", "New York Jets", "New York Giants", "Dallas Cowboys"] >>> process.extract("new york jets", choices, limit=2) [('New York Jets', 100), ('New York Giants', 78)] >>> process.extractBests("new york", choices, score_cutoff=85, limit=3) [('New York Jets', 90), ('New York Giants', 90)] >>> process.extractOne("cowboys", choices) ("Dallas Cowboys", 90) You can also pass additional parameters to ``extractOne`` method to make it use a specific scorer.
Author   seatgeek
🌐
Kaggle
kaggle.com › code › mahmoudshogaa › fuzzywuzzy-explanation
fuzzywuzzy explanation | Kaggle
February 6, 2024 - Explore and run AI code with Kaggle Notebooks | Using data from No attached data sources