Use mask_pii() to recognize and mask Personally Identifiable Information (PII) entities within a specified column of a DataFrame. PII encompasses any data that could potentially identify a specific individual. Direct identifiers are explicit pieces of information that can uniquely identify an individual. These include sensitive data such as names, email addresses and phone numbers. Indirect identifiers, on the other hand, are pieces of information that may not identify an individual on their own but can do so when combined with other data. Examples include dates or unique device identifiers.
mask_pii() can recognize a diverse set of PII entities including 'Name', 'address', 'contact numbers', 'date/time' and 'serial numbers'. The output has two columns 'PII_Entities' that contains the name, start position and the length of the identified entity and 'Masked_Phrase' where PII entities are masked with the asterisk (*) sign and returned.
If api_type' is set to aws, azure, gcp, or nim, any errors or exceptions encountered will label the outcome as "NaN." Additionally, the error details are included in the Message column of the output.
Syntax
mask_pii(column, data **kwargs)