-
Notifications
You must be signed in to change notification settings - Fork 3
/
blocker.py
29 lines (24 loc) · 868 Bytes
/
blocker.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
class Blocker(object):
"""The customized blocker must have a block method as below. The constructor
can be overwritten"""
def __init__(self):
pass
def block(self, left_table, right_table, id_column):
""" Perform blocking on two tables
Parameters
----------
left_table: pd.DataFrame
Reference table. The left table is assumed to be almost
duplicate-free, which means it has no or only few duplicates.
right_table: pd.DataFrame
Another input table.
id_column: string
The name of id column in two tables.
Returns:
--------
result: pd.DataFrame
A table of records pairs survived blocking. Column names
id_column + "_l" and id_column + "_r"
"""
result = None
return result