Skip to main content

Anonymizes pandas dataset and provides a hash dictionary to de-anonymize

Project description

NER Anonymizer

This repository contains some developmental tools to anonymize a pandas dataframe.

NER Anonymizer contains a class DataAnonymizer which handles anonymization in free text columns by using named entity recognition (NER) with a pretrained model from the transformers package to pick up entities such as location and person, generate a MD5 hash for the entity, replaces the entity with the hash, and stores the hash to entity in a dictionary for de-anonymization. A similar process is repeated for categorical columns, without the use of NER.

Example Usage

Open a terminal and run the following lines (this assumes you have python 3 installed):

git clone https://github.com/kelvnt/data_anonymizer.git
cd data_anonymizer
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
jupyter-lab

Open example_usage.ipynb to explore how DataAnonymizer works.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ner-anonymizer-0.1.1.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

ner_anonymizer-0.1.1-py3-none-any.whl (5.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page