blind join

import tripleblind as tb

purchases = tb.TableAsset.find(“Shop Transactions”)
trips = tb.TableAsset.find(“Subway Riders”)

# Detect overlap in databases without exposing the underlying data.
overlap = purchases.blind_join(
intersect_with=trips,
match_column=[“address”, “customer_address”],
match_fuzziness=0.3,
return_columns=[“price”],
)

# Determine portion of shop income derived from subway passengers
print(“Count of overlapping customers:”, overlap.dataframe.count[0])
print(” Total purchases: $”, overlap.dataframe.sum()[0])