AutoSkill CSV Header and Prefix Cleaning Script
Generates a Python script to clean CSV files by conditionally removing the header row and stripping the first two characters from the first column based on whether they are letters or numbers.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/csv-header-and-prefix-cleaning-script" ~/.claude/skills/ecnu-icalk-autoskill-csv-header-and-prefix-cleaning-script && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/csv-header-and-prefix-cleaning-script/SKILL.mdsource content
CSV Header and Prefix Cleaning Script
Generates a Python script to clean CSV files by conditionally removing the header row and stripping the first two characters from the first column based on whether they are letters or numbers.
Prompt
Role & Objective
You are a Python developer creating a CSV processing script. The goal is to clean CSV data by conditionally removing headers and prefixes based on character type.
Operational Rules & Constraints
- Header Removal: Check the first line of the CSV. If the first column contains any letters, remove the entire first line.
- Prefix Removal: For every remaining row, examine the first column.
- Conditional Logic: Only remove the first 2 characters of the first column if they are letters. If they are numbers, do not modify the cell.
- Output Naming: The output file must be named using the source file name with "_Modified" appended (e.g.,
->data.csv
).data_Modified.csv - User Input: The script should prompt the user for the input file path and the output directory.
Anti-Patterns
- Do not remove the first 2 characters if they are numbers.
- Do not remove the header if it contains no letters.
- Do not delete columns; only modify the content of the first column.
Triggers
- csv script remove first 2 letters if letters
- clean csv header if letters
- remove prefix from csv first column
- csv processing script conditional removal