Skills / Clean a dataset
Clean a dataset
Turn a messy dataset into one you can trust. Types fixed, duplicates gone, missing values handled, every change logged. Use when they have an export or collected data that looks wrong, or another skill stalls because the data is a mess.
Use this skill. Nothing to install.
Don't have an agent? · Raw file: skills/clean-a-dataset.md
Watch the first two minutes
This is how a cleaning session starts, including the rule that protects you from yourself. Click through it.
Scripted example of a real session.
Isn't editing the data just... changing the data?
It can be, which is why the skill makes you keep a log tab: one line per change, what and why, with row counts before and after. The original stays untouched in the raw tab, so any change can be traced or reversed. Blanks are decided per column instead of filled to look complete, out-of-range values get flagged in a notes column instead of silently deleted, and you make every judgment call because you know the data's world. If you want a dataset of your own to practice on, these projects produce satisfyingly messy ones:
What you end up with
Three tabs. The same signup rows before and after, and the log that says what happened in between.
name joined paid Priya S. March 3rd yes priya s March 3rd yes Jordan M. $10 DANA K 3/9/26 ten dollars
name joined paid notes Priya S. 2026-03-03 10 Jordan M. 2026-03-05 10 joined date from form email Dana K. 2026-03-09 10
removed 4 exact dupes (form double-submit), 212 -> 208 dates parsed to YYYY-MM-DD, 11 were text "paid" to numbers; "ten dollars" confirmed as 10 w/ Dana merged 3 spellings of Priya S. (same email)
- The original survives. The raw tab is copied first and never edited. Every fix happens on the clean tab, so nothing is unrecoverable.
- One problem type at a time. Types first, then inconsistent labels, then duplicates, then blanks, then out-of-range values. You decide each case; the skill explains the trade-off.
- The log is what separates cleaning from tampering. One line per change with a reason and row counts. It also records anything masked before sharing, like other people's contact details.
- Cleaning has to buy something. The session ends with a summary formula that failed on raw working on clean, and with you able to say in one sentence what this dataset can and cannot answer.
Questions people actually ask
Will I lose my original data?
No. The first step is copying everything to a raw tab that stays read-only for the whole session. All fixes happen on a separate clean tab.
What do I do with blank cells?
Decide per column, out loud: leave blank, fill with a known value, or drop the row, and write the reason in the log. A blank is information. The skill never invents a value to make a column look complete.
How do I know when it's clean enough?
When one row means one thing, columns hold one type each, and a summary formula that failed on the raw tab works. Clean enough to answer your question is the bar, and the skill has you state what the dataset still cannot answer.
My dataset has other people's names and emails in it.
Then before the sheet is shared anywhere, you mask or remove those columns and add a log line saying what was removed. The skill prompts this explicitly.
Do I need to code?
No. Everything happens in Google Sheets or LibreOffice Calc with sorting, find-replace, TRIM, COUNTBLANK, and helper columns. If your questions later outgrow formulas, first-sql is the next step.
Where to go from here
Data clean? Now it will not fight back:
Need messier practice? Collect a dataset of your own:
Ideas to use it on
- Study time vs results, honestly — Does more studying actually move your grades?
- A text classifier for your own writing — Train a classifier on text you already own: your notes, journal entries, essays, saved snippets, or drafts, sorted into categories you actually use.
- A recommender trained on your own ratings — You have years of opinions about books or movies.
- Will you actually like this track — Request your full listening-history export and build a model that predicts whether you will like a track you have not heard yet.
Curious? Read the full skill — the exact instructions your agent gets
--- name: clean-a-dataset category: data description: Turn a messy dataset into one you can trust. Types fixed, duplicates gone, missing values handled, every change logged. Use when they have an export or collected data that looks wrong, or another skill stalls because the data is a mess. --- # clean-a-dataset Clean a real dataset with someone, and teaching them that cleaning is most of data work. The dataset must be one they actually have: a bank or app export, a club sign-up sheet, survey responses, game logs, a sheet a teacher or boss shared. Work in Google Sheets or LibreOffice Calc. Never overwrite the original — copy it to a new tab called `raw` first and treat that tab as read-only. Keep sensitive data local and minimize it before work begins. Do not upload or share bank exports, student records, names, contact details, or identifiers without the data owner's permission. Remove or mask fields the analysis does not need, and use a redacted sample when asking another person or service for help. ## Look before touching Walk the data together and write down what you both see: - How many rows and columns? What is one row supposed to represent? - Sort each important column and skim the extremes — that surfaces typos, impossible values, and stray text in number columns. - Count blanks per column (COUNTBLANK). Count exact duplicate rows. - Note every problem in a list before fixing anything. The list becomes the cleaning log. ## Fix, one problem type at a time Work on a copy tab called `clean`. For each fix, they decide, you explain the trade-off: 1. Types: dates parsed as dates, numbers stripped of units and commas, one format per column. Text-that-should-be-number is the most common breakage; show a formula failing on it first. 2. Inconsistent labels: "NY", "ny", "New York" become one value. TRIM and a find-replace pass; a helper column with the mapping if there are many. 3. Duplicates: exact duplicates usually go, but check whether two identical rows could both be real (two same-priced purchases the same day can be). Deciding takes knowledge of the data, which they have and you do not — ask. 4. Missing values: blank is information. Choose per column — leave blank, fill with a known value, or drop the row — and say why. Never invent a value to make a column look complete. 5. Out-of-range values: a 130% grade or negative age is a typo or a lie. Trace it to the source if possible; otherwise flag it in a `notes` column rather than silently deleting. ## Write down what changed Keep a third tab called `log`: one line per change, what and why, with row counts before and after. This is the habit that separates cleaning from tampering — anyone, including future-them, can see exactly what the data went through. If the dataset contains other people's names or contact details, add a line about what was removed or masked, and do that before the sheet is shared anywhere. ## Done - `raw` tab untouched, `clean` tab tidy: one row per thing, typed columns, consistent labels, duplicates resolved, blanks decided - `log` tab listing every change with a reason - Sensitive fields removed or masked before sharing, with access and storage location recorded - One summary formula on the clean tab works that failed on the raw tab — proof the cleaning bought something - They can say in a sentence what the dataset can and cannot answer Then use chart-the-truth or first-sql on the cleaned data.







