ai_data_masking
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| ai_data_masking [2025/05/25 15:53] – [Best Practices] eagleeyenebula | ai_data_masking [2025/05/25 16:03] (current) – [Basic Example] eagleeyenebula | ||
|---|---|---|---|
| Line 85: | Line 85: | ||
| * Returns the modified DataFrame with the specified columns masked. | * Returns the modified DataFrame with the specified columns masked. | ||
| - | Example Workflow: | + | **Example Workflow:** |
| * Import the **DataMasking** class. | * Import the **DataMasking** class. | ||
| Line 130: | Line 130: | ||
| ==== Basic Example ==== | ==== Basic Example ==== | ||
| - | Mask specific columns using the default placeholder | + | Mask specific columns using the default placeholder |
| < | < | ||
| Line 264: | Line 264: | ||
| 1. **Hashing for Obfuscation: | 1. **Hashing for Obfuscation: | ||
| - | - Replace sensitive values with hashed tokens using libraries like `hashlib`. | + | - Replace sensitive values with hashed tokens using libraries like **hashlib**. |
| **Example: Hashing Columns** | **Example: Hashing Columns** | ||
| - | ```python | + | < |
| + | python | ||
| import hashlib | import hashlib | ||
| Line 277: | Line 278: | ||
| hashed_data = hash_columns(data, | hashed_data = hash_columns(data, | ||
| - | ``` | + | </ |
| 2. **Encrypting Sensitive Columns:** | 2. **Encrypting Sensitive Columns:** | ||
| - | - Use encryption for reversible masking (e.g., library | + | - Use encryption for reversible masking (e.g., library |
| 3. **Handling Multilingual Text in Datasets:** | 3. **Handling Multilingual Text in Datasets:** | ||
| Line 312: | Line 313: | ||
| ===== Conclusion ===== | ===== Conclusion ===== | ||
| - | The **`ai_data_masking.py`** module provides fast, flexible, and secure masking capabilities for sensitive data. With its Pandas DataFrame integration, | + | The **ai_data_masking.py** module provides fast, flexible, and secure masking capabilities for sensitive data. With its Pandas DataFrame integration, |
ai_data_masking.1748188416.txt.gz · Last modified: 2025/05/25 15:53 by eagleeyenebula
