The problem
A dataset can be useful for development or analysis and still contain values that should not travel with it. Replacing every field with random text destroys useful structure. Leaving everything untouched creates a different problem.
Data Anonymizer makes the transformation a column-level decision. The Python core reads CSV and Excel files and applies a configuration to each selected sheet and column. A FastAPI layer and a Streamlit interface surround that core.
The engineering decisions
Keep the transformation configurable.
The same dataset can call for different treatments: mask a name, create a deterministic pseudonym for an identifier, generalize a numeric value into a range, or remove a column entirely. The configuration selects a method and its options. The transformation starts from a copy of the input dataframe.
Preserve useful relationships deliberately.
The pseudonym method derives a short identifier from a salted SHA-256 hash. Repeated values with the same salt receive the same pseudonym. That can support repeatable development fixtures, but the salt, collision risk and linkability need deliberate treatment.
Separate the core from the interface.
File loading, transformation and export live in the Python core. That separation makes individual methods easier to inspect and exercise without going through the interface.
A small configuration example
{
"Sheet1": {
"name": "mask",
"customer_id": {
"method": "pseudonymize",
"options": { "prefix": "CUSTOMER" }
},
"internal_notes": "remove"
}
}This example illustrates the repository’s sheet-and-column configuration shape. It is a transformation rule, not a guarantee that a resulting dataset cannot be reidentified.
What I would harden next
Several implementation choices deserve explicit attention before sensitive production use: the fallback salt is fixed, pseudonyms are truncated, and a transformation exception logs an error and continues. A stricter export policy should fail closed when a required transformation does not complete.
I would also validate configuration before processing, require salt management, and test combinations of quasi-identifiers. Privacy claims need evidence about the whole dataset and threat model; the presence of a masking or noise function alone is insufficient.
Explore the actual implementation.
The most useful review starts in the transformation core. Follow a configuration from input value to exported result, then consider what should happen on an error.
Read the Python core ↗Based on the public repository’s source, reviewed at commit 4fe86fc. The visual above is an illustrative mock dataset. This page does not claim a production deployment, certified privacy protection or measured business outcomes.