Skip to main content

pandas-dedupe

The Dedupe library made easy with Pandas.

Installation

pip install pandas-dedupe

Usage

Basic Deduplication

import pandas as pd
import pandas_dedupe

#load dataframe
df = pd.read_csv('test_names.csv')

#initiate deduplication
df_final = pandas_dedupe.dedupe_dataframe(df,['first_name', 'last_name', 'middle_initial'])

#send output to csv
df_final.to_csv('deduplication_output.csv')


#------------------------------additional details------------------------------

#A training file and a settings file will be created while running Dedupe. 
#Keeping these files will eliminate the need to retrain your model in the future. 
#If you would like to retrain your model, just delete the settings and training files.

Basic Matching / Record Linkage

import pandas as pd
import pandas_dedupe

#load dataframes
dfa = pd.read_csv('file_a.csv')
dfb = pd.read_csv('file_b.csv')

#initiate matching
df_final = pandas_dedupe.link_dataframes(dfa, dfb, ['field_1', 'field_2', 'field_3', 'field_4'])

#send output to csv
df_final.to_csv('linkage_output.csv')


#------------------------------additional details------------------------------

#Use identical field names when linking dataframes.

#Record linkage should only be used on dataframes that have been deduplicated.

#A training file and a settings file will be created while running Dedupe. 
#Keeping these files will eliminate the need to retrain your model in the future. 
#If you would like to retrain your model, just delete the settings and training files.

Credits

Many thanks to folks at DataMade for making the the Dedupe library publicly available. People interested in a code-free implementation of the dedupe library can find a link here: Dedupe.io.

Release files for pandas-dedupe 0.21

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pandas-dedupe 0.21
File Size Uploaded
pandas_dedupe-0.21.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pandas-dedupe 0.21
File Interpreter ABI Platform
pandas_dedupe-0.21-py3-none-any.whl Python 3 none any Details

Total release size: 9.0 kB

Release files / pandas_dedupe-0.21.tar.gz

Download URL pandas_dedupe-0.21.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
03bf1073bd8ea4829f6937fb87fe93e69c5a785ed261b45832d2ed227c2362e3
BLAKE2b-256 checksum
How to use checksums
d4aea6370bb2998ae1516877ed81ddba89687d5e8024676af6c7e22cc02db1ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6

Release files / pandas_dedupe-0.21-py3-none-any.whl

Download URL pandas_dedupe-0.21-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6c791f71f1c98643febcaa16cecad5cca4b1d2ece96c681d9a2d1b2a9bb12925
BLAKE2b-256 checksum
How to use checksums
6b1efdc004604aa88e2f3850964691ebb9fcb11c083ae6ab22a52050ca154ea4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6

Release history Release notifications | RSS feed

1.5.0

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.1.1

2 release files

1.0.0

2 release files

0.42

2 release files

0.31

2 release files

0.24

2 release files

0.22

2 release files

This release

0.21 This release

2 release files

0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page