Cleaning a dataset does not start with deleting rows. The fastest way to wreck an analysis is to tidy first and understand later — you throw out the very rows that explain why your numbers looked wrong. These five ChatGPT prompts help you inspect before you edit.
What’s on this page
- A prompt that profiles a dataset before any change.
- A prompt that finds duplicates and missing values safely.
- A prompt that standardizes messy text columns.
- A prompt that writes the cleaning steps as reproducible notes.
The prompts
1. Profile the Dataset
Here is a sample of my dataset: [paste dataset sample]. List each column in [column names], its likely type, how many values look missing, and the top oddity I should investigate before cleaning. Do not change anything yet — just report.
What it does: Gives you a map of the data before you touch it, so edits are deliberate.
How to use: Paste 20 to 50 rows, not the whole file. Read the oddities before running the next prompt.
2. Find Duplicates and Gaps
Using this data: [paste dataset sample], identify exact duplicate rows and rows missing a value in [column names]. For each problem, say whether to drop, fill, or leave it, and why. Do not actually delete — return a list of row indices to review.
What it does: Separates real duplicates from coincidental ones and queues gaps for a decision.
How to use: Name the key columns in [column names]. Review the index list before deleting anything.
3. Standardize Text Columns
My column [messy column] has inconsistent casing, spacing, and synonyms (e.g. "NYC", "nyc", "New York"). Write a set of rules to standardize it to one form, list the distinct variants you see, and show the rule applied to 5 example cells. Keep the rules reversible where possible.
What it does: Turns a chaotic text field into one consistent vocabulary.
How to use: Paste the actual distinct values if you can. Check that the rules do not merge two real categories.
4. Handle Outliers Deliberately
Examine the numeric column in [paste dataset sample]. Flag values that look like outliers under [outlier rule]. For each, say whether it is a data-entry error, a real extreme, or ambiguous, and recommend keep, cap, or remove. Never remove without labeling the reason.
What it does: Forces a reason for every outlier decision instead of blind deletion.
How to use: Define [outlier rule] (e.g. beyond 3 standard deviations). Keep the labeled list for your report.
5. Document the Cleaning Steps
Summarize the cleaning decisions from this session into a numbered checklist a colleague could repeat in [tool]: profile, dedupe, standardize [messy column], handle outliers per [outlier rule]. For each step, note the exact action taken and the rows affected.
What it does: Leaves a paper trail so the cleaning is reproducible and defensible.
How to use: Name your [tool] (Excel, Python, etc.). Paste this checklist into the project folder before analysis.
How to adapt these prompts
- Keep a raw copy untouched; every cleaning prompt should point at the sample, not the master.
- Change [column names] per dataset — a profile built on the wrong key column misses duplicates.
- Re-run prompt 1 after cleaning to confirm the oddities actually went away.
FAQ
Should I clean in ChatGPT or in my analysis tool?
Use ChatGPT to plan and document; do the edits in the tool so the changes are real and reversible.
How much of the dataset should I paste?
A representative sample of 20 to 50 rows is enough for rules. Apply the rules to the full file in your tool.
What if standardizing merges two meanings?
Then the rule is too aggressive. Keep the distinction and note it, because the difference may be the finding.
Keep going
- Browse the Data & Analysis prompt library
- 5 ChatGPT prompts for data analysis plans
- 5 ChatGPT prompts for XLOOKUP and VLOOKUP
- All ChatGPT prompts
GuPrompt keeps every prompt copy-paste ready. No account needed.