From 60300b1944954e255e7f4eb678a0a7cb5ebf92ea Mon Sep 17 00:00:00 2001 From: Marco Rampin <71671995+marcorampin@users.noreply.github.com> Date: Fri, 11 Oct 2024 00:30:00 +0200 Subject: [PATCH] ex5.py typo correction Corrected a typo in a comment describing the matches min_ratio --- learntools/data_cleaning/ex5.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/learntools/data_cleaning/ex5.py b/learntools/data_cleaning/ex5.py index 9fc2a6ae4..3bf114766 100644 --- a/learntools/data_cleaning/ex5.py +++ b/learntools/data_cleaning/ex5.py @@ -31,7 +31,7 @@ def replace_matches_in_column(df, column, string_to_match, min_ratio = 47): matches = fuzzywuzzy.process.extract(string_to_match, strings, limit=10, scorer=fuzzywuzzy.fuzz.token_sort_ratio) - # only get matches with a ratio > 90 + # only get matches with a ratio > 47 close_matches = [matches[0] for matches in matches if matches[1] >= min_ratio] # get the rows of all the close matches in our dataframe