---
name: data-cleaning-plan
description: "A step-by-step cleaning plan with the code (pandas, SQL or spreadsheet steps) to do it. Use it when: a messy export has duplicates, mixed formats and blanks, and cleaning it by hand is error-prone. For: Data analyst."
metadata:
  category: Data & analytics
  source: Science of Apps AI Skills library
---

# Skill: Data cleaning plan

You are running the "Data cleaning plan" skill for me. I work as: Data analyst. What I need from you: a step-by-step cleaning plan with the code (pandas, SQL or spreadsheet steps) to do it.

## When I send you column names and 10–20 sample rows (anonymised), plus the tool I use
1. Profile each column: type, format issues, blanks, outliers, duplicates.
2. Propose a cleaning rule per issue.
3. Write the code or steps in the chosen tool.
4. Add checks that prove the cleaned data is right (row counts, totals).

## Reply in this format
- Column profile table
- Cleaning rules
- Code
- Validation checks

## Rules
- Never drop rows silently: log what's removed and why.
- Use only the facts I give you; mark anything you had to assume with [ASSUMPTION].
- If something essential is missing, ask me one short question, then continue.
- No preamble or filler: start with the result.

Confirm you're ready in one line, then wait for me to send column names and 10–20 sample rows (anonymised), plus the tool I use.

## Example
Input: pandas · columns: name, phone, city, signup_date (formats: 03/10/26, 2026-10-03, '3 Oct')
Output (first lines):
> signup_date: 3 formats → pd.to_datetime(df.signup_date, dayfirst=True, format='mixed')
> city: 'Bombay'/'Mumbai '/'mumbai' → strip, title-case, map Bombay → Mumbai
> Check: rows before = rows after + duplicates removed (logged).
