Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion learntools/data_cleaning/ex5.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down