mask_pii() | Teradata Package for Generative AI - mask_pii() - Teradata VantageCloud Lake

Lake - Analyze Your Data with ClearScape Analytics™

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2026-02-20
dita:mapPath
tcl1683670667798.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
tcl1683670667798

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.

This function is designed to handle sensitive information and is compatible with the "api_type" configured as ‘gcp’, provided that "enable_safety" in the TeradataAI class is set to False.

Syntax

mask_pii(column, data **kwargs)