invisible_char_cleaner

Remove invisible characters from CSV, TSV, Excel, and SPSS text data.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill addresses the issue of invisible and disruptive characters in text data, ensuring more accurate processing and analysis.

Core Features & Use Cases

  • Invisible Character Removal: Removes a comprehensive set of 63 invisible characters, including BOM, zero-width spaces, control characters, and others.
  • Customizable Column Selection: Allows users to specify which text columns to process, improving efficiency.
  • Formatting Retention: Option to keep formatting characters like ZWJ/ZWNJ for specific languages.
  • Use Case: Ideal for preprocessing multi-source data, before analysis or before importing into databases.

Quick Start

Run the invisible_char_cleaner skill with the input file path and output file path: python scripts/invisible_char_cleaner.py --input_path input.csv --output_path output.csv

Frequently Asked Questions about invisible_char_cleaner

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

FAQPage Schema
How do I remove invisible characters from a CSV file for data preprocessing?

To remove invisible characters from a CSV file, use a text cleaning script that deletes BOM, zero-width spaces, and control characters. This data preprocessing step ensures your structured text data is clean and ready for accurate analysis.

What invisible characters disrupt text data and cause processing errors?

Invisible characters that disrupt text data include BOM markers, zero-width spaces, and control characters. Removing these 63 specific invisible characters during data preprocessing prevents parsing errors and ensures accurate text processing in formats like CSV and Excel.

Can I clean invisible characters from Excel and SPSS files?

Yes, you can clean invisible characters from Excel and SPSS files, as well as CSV and TSV formats. The text cleaning process utilizes Python's translate method to efficiently delete disruptive characters while allowing customizable column selection for targeted data preprocessing.

How do I keep formatting characters like ZWJ when cleaning text data?

To keep formatting characters like ZWJ or ZWNJ when cleaning text data, use the formatting retention option during invisible character removal. This ensures language-specific formatting characters are preserved while other disruptive invisible characters are deleted from your structured text.

What is the best way to remove zero-width spaces from structured text data?

The best way to remove zero-width spaces from structured text data is by using Python's translate method for efficient character deletion. This approach targets 63 invisible characters across CSV, TSV, Excel, and SPSS files, ensuring cleaner data preprocessing.

Why does invisible character removal fail to parse my multi-source data?

Invisible character removal may fail if formatting characters like ZWJ or ZWNJ are unintentionally deleted. To fix text processing issues with multi-source data, ensure you enable the formatting retention option to preserve language-specific characters while removing BOM and control characters.