Dedupe
dedupe is an open-source Python library that finds duplicate records and links datasets, learning its matching rules from pairs you label as it asks.
dedupe is an MIT-licensed Python library from DataMade for fuzzy matching, deduplication and record linkage on structured data. You describe the fields, label a few dozen pairs it picks through active learning, and it learns field weights and blocking rules, then clusters matching records. It runs on a laptop; the hosted Dedupe.io service shut down in 2023.
dedupe is a Python library for the problem of deciding which rows refer to the same real-world thing: two customer records with a misspelled surname, a venue listed under three addresses, a donor entered once with a middle initial and once without. It was written by Forest Gregg and Derek Eder at DataMade, is MIT-licensed, and lives at dedupeio/dedupe on GitHub.
Highlights
- Learns from your labels. You do not write match rules. dedupe shows you pairs, you mark each as a match or distinct, and it fits a regularized logistic regression that turns field-by-field distances into a match probability.
- Active learning. It picks the pairs it is least certain about, so each answer you give teaches the model as much as possible.
- Learned blocking. Comparing every record with every other is too slow, so dedupe learns a small set of blocking rules that group likely matches. Rules are built from predicates such as "first three characters of the field" or "every word in the field", plus index predicates that cost more memory. See blocking for the concept and dedupe's own explanation.
- Clustering, not only pairs. Pair scores are grouped into entities using hierarchical clustering with centroid linkage, and each record gets a confidence score for its cluster.
- Typed fields. Variable types include
String,ShortString,Text,Exact,Categorical,Price,LatLong,Set,Exists,InteractionandCustom, with optional add-on packages for dates, addresses and names. - Three matching modes.
Dedupefor one dataset,RecordLinkfor joining two, andGazetteerfor matching against a canonical list. - Reusable settings. Training labels save to JSON and the learned model to a settings file, which the
Staticclasses load without retraining.
In an AI-assisted workflow
Install it from PyPI:
pip install dedupeA minimal deduplication run, using the API from the 3.0 documentation. Records are a dictionary keyed by your own record ID, and empty values should be None:
import csv
import dedupe
# venues.csv is your own file with id, name, address and phone columns
with open("venues.csv") as f:
data = {
row["id"]: {k: (v.strip().lower() or None) for k, v in row.items() if k != "id"}
for row in csv.DictReader(f)
}
variables = [
dedupe.variables.String("name"),
dedupe.variables.String("address"),
dedupe.variables.String("phone", has_missing=True),
]
deduper = dedupe.Dedupe(variables)
deduper.prepare_training(data)
dedupe.console_label(deduper) # answer y / n / u, then f to finish
deduper.train()
with open("training.json", "w") as f:
deduper.write_training(f)
with open("learned_settings", "wb") as f:
deduper.write_settings(f)
for record_ids, scores in deduper.partition(data, threshold=0.5):
print(record_ids, scores)partition returns one tuple per cluster: the record IDs it believes are the same entity, and a confidence score for each. Lowering threshold raises recall and raising it raises precision.
Keep your source keys through the whole run, and treat the clusters as candidates for review, not as merges. The guide to linking records across datasets covers how to keep provenance, measure what blocking never compared, and hold out known pairs for evaluation, and the duplicate record review guide covers the human review step. An assistant such as Claude Code is useful for writing the loading and normalization code around dedupe; the labeling decisions should stay with someone who knows the data.
Good to know
Maintenance status matters here. As of November 2026, the latest PyPI release is 3.0.3 from August 2024, the repository's last push was in July 2025, and the published wheels cover Python 3.8 through 3.13. The repository has about 4,500 stars as of November 2026 and is not archived, but this is a stable, slow-moving project, not an active one. The commercial Dedupe.io web service that DataMade built on the library was shut down on January 31, 2023, so there is no hosted version or paid support.
Scale is the other limit. The docs say partition and join should only be used on small to moderately sized datasets. Building index predicates and clustering both happen in memory; setting index_predicates=False in train() cuts memory and time at some cost in recall, and beyond that you generate candidate pairs yourself and call score(). A learned model is also only as good as the labeled pairs, so a rare kind of duplicate you never labeled may never be blocked together.
Among open-source alternatives, Splink, published under the moj-analytical-services organisation on GitHub, is MIT-licensed and takes a different approach: a probabilistic linkage model that runs in Python on DuckDB or on backends such as Spark, which its README pitches at 100 million records or more, with unsupervised training that needs no labeled pairs. Zingg is an AGPL-3.0 project aimed at entity resolution at scale. Both repositories were being updated as of November 2026. Tamr is the enterprise route: a commercial data mastering platform, for organizations that want a managed product instead of a library. Choose dedupe when the data fits on one machine, you are comfortable in Python, and you can spend an hour labeling pairs.
Frequently asked questions
- Is dedupe still maintained?
- It is in slow maintenance. As of November 2026, the latest release on PyPI is 3.0.3, uploaded in August 2024, and the GitHub repository's last push was in July 2025. The repository is not archived and has about 4,500 stars. The hosted Dedupe.io product built on the library was shut down on January 31, 2023.
- How much training data does dedupe need?
- None up front. dedupe uses active learning: it shows you the record pairs it is least sure about and you answer yes, no or unsure in the console. You can save the labels to a JSON file and reuse them. The docs default to sampling 1,500 candidate pairs, and you stop labeling when you judge you have covered enough matches and non-matches.
- Can dedupe link two different datasets?
- Yes. The Dedupe class finds duplicates inside one dataset, RecordLink joins two datasets that each have no internal duplicates, and Gazetteer matches messy records against a clean canonical list. Each has a Static version that loads saved settings so you can skip training on later runs.
- How large a dataset can dedupe handle?
- The project says it runs on a laptop, but the convenience methods partition and join are documented as suitable only for small to moderately sized data. Clustering is done in memory, and the docs say the only fix when that runs out is fewer records. Larger jobs mean generating candidate pairs yourself and passing them to score().
Filed under
entity-resolution · deduplication · record-linkage · python · active-learning
Related
- Blocking in Record MatchingBlocking is the record-matching step that picks candidate pairs by shared features, so only those pairs are compared. It narrows work without deciding identity.
- Link Records Across Datasets with AI-Assisted ReviewBuild a cross-source entity crosswalk that preserves both record keys, unresolved candidates and cardinality decisions without silently joining or merging data.
- TamrTamr is an AI-native master data management platform that resolves entities across source systems into golden records, sold on quoted subscriptions.
- Review AI Duplicate-Record Candidates Before MergingSeparate duplicate-record candidate generation from human match decisions, retaining source keys and field evidence before any merge.
- Record LinkageRecord linkage is the task of finding records in different datasets that refer to the same real-world entity when they share no reliable common key.