Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Analyzing PII in datasets

Project Description

PII Analyzer
Analyzing PII in datasets

Classifying datasets and resources into ‘PII’ and ‘Not PII’.

The task requires creation of a tool that will detect whether new datasets uploaded to HDX contain any personally
identifiable information - data that can be used on its own or with other information to identify, contact, or
locate a single person, or to identify an individual in context.

The tool should then alert the HDX data manager whether any such data sets have been uploaded
and also alert the data owner about this.

My Solution

I decided to use the following tools for the above task:

1. `Pandas <>`_: for reading the data files into python and manipulating the datasets.

2. `Common Regular expressions <>`_: for extracting some types of 'PII' such as email addresses, phone numbers, street addresses,
credit card numbers,

3. `Stanford Named Entity Tagger <>`_: for extracting the locations, organizations and peoples names.

The analyzer opens the provided file, analyses it and returns a summary of the types of data that are in the provided dataset.
With this information the data manager can easily classify the data.


>>> from piianalyzer.analyzer import PiiAnalyzer
>>> filepath = '/path/or/url/to/your/file.csv'
>>> piianalyzer = PiiAnalyzer(filepath)
>>> analysis = piianalyzer.analysis()



Requires the Stanford Named Entity Recognizer. It can be downloaded here:



* Reading other file types such as excel, text, html etc


`piianalyzer` was written by `Savio Abuga <>`_.

Release History

This version
History Node


Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(3.0 kB) Copy SHA256 Hash SHA256
Source None Sep 1, 2015

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers