data_masking

Mask sensitive information in CSV, TSV, and Excel files using character replacement.

541|171|Updated May 3, 2018
One-click install
npx skills add https://github.com/cas-bigdatalab/piflow --skill data-masking
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data_masking
Source: https://github.com/cas-bigdatalab/piflow/tree/main/workspace/skills/data_masking
Command: npx skills add https://github.com/cas-bigdatalab/piflow --skill data-masking

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandas, openpyxl, and includes scripts (resource) components.

What problem does it solve?

This Skill offers an easy solution to mask sensitive information in structured data files, ensuring privacy and compliance.

Core Features & Use Cases

  • Sensitive Data Masking: Masks phone numbers, IDs, names, emails, and bank details with character replacement.
  • Data Security: Helps in data anonymization and privacy protection for PII handling.
  • Use Case: For example, a company might use this Skill to anonymize employee data before sharing it for compliance purposes.

Quick Start

Run the data_masking skill with the command: 'data_masking --input employee_data.csv --output anonymized.csv --masking_rules "phone:phone,idcard:idcard,name:name,email:email" --mask_char "*'

Frequently Asked Questions about data_masking

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I mask sensitive data like phone numbers and emails in a CSV file?

To mask sensitive data in a CSV file, you apply character replacement to specific columns using user-defined rules. This replaces original PII values with a designated mask character like an asterisk for data anonymization.

Can I anonymize Excel files for PII protection using pandas?

Yes, you can anonymize Excel files for PII protection using pandas and openpyxl. The tool processes structured Excel files by applying user-defined character replacement rules to sensitive columns.

What is the best way to anonymize structured data before sharing it for compliance?

The best way to anonymize structured data for compliance is applying character masking to sensitive fields. This replaces identifying information in formats like CSV or Excel with specified characters, ensuring privacy.

Does data masking work with TSV files or only CSV and Excel?

Data masking works with TSV files as well as CSV and Excel formats. It leverages pandas to handle these structured data files, applying character replacement to anonymize sensitive information across all supported types.

How do I define rules to mask specific columns like bank details in structured data?

You define rules to mask specific columns by passing a mapping string that pairs column names with data types, such as bank details or emails. The tool then applies your specified mask character to those targeted fields.

Do I need openpyxl installed to perform data masking on structured files?

Yes, you need openpyxl installed along with pandas to perform data masking on structured files. These dependencies are required to perform the necessary file operations for reading and writing Excel formats.