Similar restaurants
In the last exercise, you generated pairs between restaurants
and restaurants_new
in an effort to cleanly merge both DataFrames using record linkage.
When performing record linkage, there are different types of matching you can perform between different columns of your DataFrames, including exact matches, string similarities, and more.
Now that your pairs have been generated and stored in pairs
, you will find exact matches in the city
and cuisine_type
columns between each pair, and similar strings for each pair in the rest_name
column. Both DataFrames, pandas
and recordlinkage
are in your environment.
This exercise is part of the course
Cleaning Data in Python
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Create a comparison object
comp_cl = ____