Clean a messy dataset
A step-by-step cleaning plan for duplicates, missing values, formats, and outliers.
The prompt
Role: Act as a data analyst assessing and preparing a business dataset.
Context: Dataset description and schema (columns, types, meaning, grain): [SCHEMA]. Sample rows or profile stats: [PROFILE]. Known issues: [KNOWN_ISSUES]. Intended analysis / use: [INTENDED_USE]. Business rules the data should obey: [BUSINESS_RULES]. Tools available: [TOOLS].
Task: Produce: (1) a data-quality assessment - completeness, validity, consistency, uniqueness, accuracy signals, and timeliness, each with what you found and its severity for the intended use; (2) a cleaning plan - each issue, the transformation to apply, the rule, and what could go wrong; (3) the validation checks to run after cleaning (row counts, distributions, referential integrity, business-rule checks); (4) the issues that need a data-owner decision rather than a technical fix.
Format: Sections: Data-quality assessment (table) | Cleaning plan (table: issue | transform | rule | risk) | Post-clean validation checks | Needs a data-owner decision. ~500 words.
Verification: Do not silently drop or impute without flagging the impact on the intended analysis; quantify how many rows each step affects. Flag assumptions about column meaning.
Validation: Check the plan against the intended analysis: would the cleaned dataset actually support it, or does a fix distort the metric that matters? Adjust.
Highlighted [brackets] are blanks to replace with your own details.
Fill in the blanks and use this promptMore Data & Analysis prompts
What to fill in
- SCHEMA
- PROFILE
- KNOWN_ISSUES
- INTENDED_USE
- BUSINESS_RULES
- TOOLS
How this prompt is built
This prompt follows the RCTFVV structure (Role, Context, Task, Format, Verification, Validation). RCTFVV extends RCTF with two checking steps. Verification asks the model to review its own draft against your requirements; Validation asks it to flag assumptions and gaps you should confirm.
Related prompts
- Explain my Excel model to a non-technical executiveTurns a complex spreadsheet or model into a plain-English walkthrough an executive can follow, trust, and question.
- Run a fair lending review of loan pricing and approval dataA structured fair lending analysis plan and readout that tests for disparities in approvals, pricing, and exceptions.
- Turn a vague data request into a clear analysis planConverts a fuzzy stakeholder ask into a scoped plan with the real question, data needed, deliverable, and clarifying questions.
- Write a SQL query from plain EnglishTurns a business question into SQL, with validation checks and an explanation.