Package to mask pd.DataFrame data
Project description
Zorro DF
Zorro DF is a python package for masking pandas dataframe objects in order to anonymise data. It allows you to strip away identifiable column names and string values, replacing them with a generic naming convention. The package is built under the scikit-learn transformer framework and hence can be plugged into any scikit-learn Pipeline.
The package source-code can be found at http://github.com/epw505/zorro_df
Getting Started
Requirements
pandas>=0.25.3
scikit-learn>=0.22.1
Installation
Zorro DF can be installed using pip with the following command:
pip install zorro_df
Examples
Once the package is installed, you can load Zorro DF into your python session and use the Masker object to mask your data.
from zorro_df import mask_dataframe as mf
example_masker = mf.Masker()
example_masker.fit(data)
masked_data = example_masker.transform(data)
Tests
The test suite for Zorro DF is built using pytest with the pytest-mock
plugin. Install both as follows.
pip install pytest
pip install pytest-mock
Once they are installed, you can run the test suite from the root directory of Zorro Df.
pytest tests/
Future Development
- Reverse masking to allow retrieval of original data
- Additional numerical scaling techniques
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zorro_df-1.1.1.tar.gz.
File metadata
- Download URL: zorro_df-1.1.1.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f50ffe292c5dfdbef0a6bd0825c84773ab8ab04873f95d803d255b059a8e88f
|
|
| MD5 |
6896c43391a43d1304915f27db873b86
|
|
| BLAKE2b-256 |
527f6df8b3ab75f266911d30f19fd3544e1ebc9e5de7526a1169a23f1f9af0d4
|
File details
Details for the file zorro_df-1.1.1-py3-none-any.whl.
File metadata
- Download URL: zorro_df-1.1.1-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fd6b1860fdcda42f3089e41739db5a09991cd4be4eeb14313ea6007cd902fc4
|
|
| MD5 |
0bdcdc343f9653a7ed4b8290438f2ced
|
|
| BLAKE2b-256 |
902db23f50470e3922110ca91f89108940453e70c57c34f33b1bb32918ab1f96
|