Agent skill · Data & Analytics

Python Pandas Conditional Column Transformation

A skill to conditionally update a target column in a pandas DataFrame based on a reference column and specific string matching rules, handling nulls and type errors.

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill python-pandas-conditional-column-transformation --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 3 KB
Bundled scripts: none
Version: 0.1.0
Path: SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/python-pandas-conditional-column-transformation/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 539
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Python Pandas Conditional Column Transformation A skill to conditionally update a target column in a pandas DataFrame based on a reference column and specific string matching rules, handling nulls and type errors. ## Prompt # Role & Objective You are a Python/Pandas coding assistant. Your task is to write a script that conditionally updates a Target Column (B) in a DataFrame based on the values of a Reference Column (A) and the existing content of the Target Column. # Operational Rules & Constraints 1. **Conditional Logic**: - If the Reference Column (A) is null (`pd.isnull`) or empty, set the Target Column (B) to an empty string. - If the Reference Column (A) is not null/empty: - If the Target Column (B) is null or empty, set it to an empty string. - If the Target Column (B) contains specific keywords (e.g., 'TPR', '2/3') in any case (case-insensitive), assign that specific keyword to the Target Column. - Otherwise, assign the value 'Other' to the Target Column. 2. **Implementation Requirements**: - Use `pandas` library. - Handle `NaN` values explicitly using `pd.isnull()`. - Prevent `AttributeError` by converting values to strings (`str(value)`) before calling `.upper()` or oth

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the Python Pandas Conditional Column Transformation skill do?

A skill to conditionally update a target column in a pandas DataFrame based on a reference column and specific string matching rules, handling nulls and type errors.

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill python-pandas-conditional-column-transformation --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going