AnonymizedFaker
Compatibility: text
and pii
data
The AnonymizedFaker
creates anonymized text belonging to specific contexts or rulesets. When transforming the data, it simply removes the column. When reversing the transform, it anonymizes the column by creating completely new, fake data at random using the Python Faker library.
You can specify the exact faker method to use for more realistic data.
Parameters
provider_name
: The name of the provider to use from the Faker library.
function_name
: The name of the function to use within the Faker provider.
Together, the provider_name
and function_name
parameters specify exactly how to create fake data. Some common values are:
A full address:
provider_name="address", function_name="address"
A basic bank account number:
provider_name="bank", function_name="bban"
A full credit card number:
provider_name="credit_card", function_name="credit_card_number"
Latitude/longitude coordinates:
provider_name="geo", function_name="local_latlng"
A phone number:
provider_name="phone_number", function_name="phone_number"
To browse for more options, visit the Faker library's docs.
function_kwargs
: Optional parameters to pass into the function that you're specifying to create Fake data.
locales
: An optional list of locales to use when generating the Fake data.
Setting a locale might leak information about the original data. Anyone with access to the anonymized data will be able to tell which countries and locales are included in the original data .
cardinality_rule
: Whether to guarantee that the created fake data will be unique
Deprecated enforce_uniqueness
-> Use cardinality_rule
instead.
missing_value_generation
: Add this argument to determine how to recreate missing values during the reverse transform phase
Examples
FAQs
Last updated