In [1]:
import petl.interactive as etl
etl.__version__
Out[1]:
'0.26'
In [2]:
table1 = (('name', 'kids'),
          ('John', '1'),
          ('Jenny', '2'),
          ('James', '2'),
          ('Joan', '4'))

table2 = (('name', 'age'),
          ('John', '33'),
          ('Jenni', ''),
          ('Jomes', '20'),
          ('Joan', ''))
In [3]:
from fuzzywuzzy import fuzz
In [4]:
table3 = (etl
    .wrap(table1)
    .prefixheader('l_')
    .crossjoin(etl.wrap(table2).prefixheader('r_'))
    .addfield('fuzz', lambda row: fuzz.partial_ratio(row.l_name, row.r_name))
    .selectge('fuzz', 80)
)
table3
Out[4]:
l_name l_kids r_name r_age fuzz
John 1 John 33 100
Jenny 2 Jenni 80
James 2 Jomes 20 80
Joan 4 Joan 100
In [4]: