# CSV Cleaner

> Cleans and de-duplicates rows in a CSV using Python.

- Skill: `waelabouceo/csv-cleaner` (Agent Skill)
- Install (CLI): `npx skillmds@latest add waelabouceo/csv-cleaner`
- Raw SKILL.md: https://api.skillmd.com/api/skills/waelabouceo/csv-cleaner/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics
- Author: WaelAbouceo (https://skillmd.com/u/waelabouceo)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/waelabouceo/csv-cleaner

---


# CSV Cleaner

Load a CSV, drop duplicate and empty rows, and write the result back.

```python
import csv
with open("input.csv") as f:
    rows = list(csv.reader(f))
seen, out = set(), []
for r in rows:
    key = tuple(r)
    if any(r) and key not in seen:
        seen.add(key)
        out.append(r)
with open("cleaned.csv", "w", newline="") as f:
    csv.writer(f).writerows(out)
```

Pure local file processing. No network, no shell, no secrets.

