Skip to main content

FuzzyExact

Perform fuzzy matching against two pandas dataframes with optional exact matches.

Requirements

Python 2.7 or higher
Pandas
FuzzyWuzzy
python-Levenshtein (optional)


Installation

pip install fuzzyexact

Usage

import fuzzyexact

remove_punctuation

fuzzyexact.remove_punctuation(df, 'column_name')

remove_punctuation is a helper function which strips all punctuation out of a column in pandas dataframe and returns the cleaned dataframe

clean_address

fuzzyexact.clean_address(df, 'address_column_name')

clean_address is a helper function which cleans an address column of a pandas dataframe by capitalizing, abbreviating road types (street>ST, road>RD), and stripping out building and suite numbers.

fuzzyexact

fuzzyexact.fuzzyexact(df_left, df_right, id_col='Source_ID', key=('first_name', 'address'), block1='state', block2='last_name', threshold=80)

FuzzyExact leverages FuzzyWuzzy's process.extractOne ability, integrates it into pandas dataframes, and enables for up to two exact matches (or blocks) to significantly speed up performance of matching against large datasets. The function returns all rows from df_left along with the best match for each row in df_right. The id_col argument is an optional argument which allows the user to supply an id column from df_right to allow for easier lookups of matched records. The fuzzy match is performed against the key supplied by the user. block1 and block2 are optional arguments which specify exact matches between the two dataframes. The threshold is defaulted to 80, but can be altered by the user and will feed the cutoff to define a "good" match in FuzzyWuzzy's process.extractOne function.

Contact

Project: https://github.com/eric-tomasi/fuzzyexact
Email: etomasi2323@gmail.com

Acknowledgments

FuzzyWuzzy

Metadata

Release files for fuzzyexact 1.0.0

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

Source distribution (sdist)

Source distribution for fuzzyexact 1.0.0
File Size Uploaded Provenance Actions
fuzzyexact-1.0.0.tar.gz 3.1 kB Without provenance Details for fuzzyexact-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fuzzyexact 1.0.0
File Interpreter ABI Platform Actions
fuzzyexact-1.0.0-py3-none-any.whl Python 3 none any Details for fuzzyexact-1.0.0-py3-none-any.whl

Total release size: 8.0 kB

Release files / fuzzyexact-1.0.0.tar.gz

Download URL fuzzyexact-1.0.0.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
324e6421d0f5e02bff349546267c12cf8174ca2ca394de8fdab28d2c0eedb67f
BLAKE2b-256 checksum
How to use checksums
0510ae46b22abaed79609b74e336ad1eed77ea670f40b32f2b41da7106bc0548
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.4.2 requests/2.21.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

Release files / fuzzyexact-1.0.0-py3-none-any.whl

Download URL fuzzyexact-1.0.0-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9430323ab865e30014ff2c887032eb37db0cceb3110a9789b81033c96fb7c604
BLAKE2b-256 checksum
How to use checksums
ca550273d9f25f6167e3de39f5db27769d50a8ca4b5d2c99c96a34d291c7b5cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.4.2 requests/2.21.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

Security for fuzzyexact 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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