A fast k-anonymity implementation using Polars and PySpark
Project description
Polarfrost
A fast k-anonymity implementation using Polars, featuring both Mondrian and Clustering algorithms for efficient privacy-preserving data analysis.
Features
- 🚀 Blazing fast k-anonymity using Polars
- 🧊 Supports both local (Polars) and distributed (PySpark) processing
- 📊 Preserves data utility while ensuring privacy
- 🐍 Simple Python API
Installation
pip install polarfrost
Quick Start
import polars as pl
from polarfrost import mondrian_k_anonymity
# Load your data
df = pl.read_csv("your_data.csv")
# Apply k-anonymity
anonymized = mondrian_k_anonymity(
df,
quasi_identifiers=["age", "gender", "zipcode"],
sensitive_column="income",
k=3,
categorical=["gender", "zipcode"]
)
print(anonymized)
License
MIT
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
polarfrost-0.1.0.tar.gz
(6.5 kB
view details)
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 polarfrost-0.1.0.tar.gz.
File metadata
- Download URL: polarfrost-0.1.0.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
047c6ec3a74b4474d658d2748ab3451ea410f755ec6387bba0791586c0d995c6
|
|
| MD5 |
14b00555fe160d8b7766913e253f8560
|
|
| BLAKE2b-256 |
c59ede4e6cbb86d33d30279f2591b06d73375b5226997c160bd3b2a60f00b9ef
|
File details
Details for the file polarfrost-0.1.0-py3-none-any.whl.
File metadata
- Download URL: polarfrost-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc19119d9d8093c62730f15a96cad3de145191f0d47055616d0e7423ad4b23ce
|
|
| MD5 |
423ae20de8500d434f34fee577b58ce5
|
|
| BLAKE2b-256 |
2c6abc737d88cd34e47e315590aad394db4e3dc5976b71e6891b56c32bdbadf4
|