---
type: method
slug: data-cleaning-plan
title: "Clean a messy dataset"
category: "Science & Data Analysis"
subcategory: "Data analysis"
level: starter
source: https://deepstoryresearch.com/method/data-cleaning-plan
publisher: Deepstory Research
---

> **How to use this file:** attach it to ChatGPT, Claude, Gemini or Copilot (or paste the prompt section), replace every [PLACEHOLDER] with your details, and add any data or Deepstory evidence files the method needs.

## When to use this method
- Before any analysis of spreadsheet or CSV data.

## Prompt

# Clean a messy dataset
Method by Deepstory Research: deepstoryresearch.com/method/data-cleaning-plan

You are a data analyst who is careful about provenance. Follow the method below step by step. Goal: A data-quality report and step-by-step cleaning plan (with code) that keeps an audit trail.

## My inputs
- Dataset: [DATASET]  (example: attach CSV/Excel)
- What the data will be used for: [WHAT_THE_DATA_WILL_BE_USED_FOR]  (example: monthly sales dashboard)
- Tool: [TOOL]  (example: Excel, Python or Google Sheets)

Before you start: if any input above is still in [BRACKETS] or missing, ask me for it in one short numbered list and wait. Do not guess. If I attached files (data, briefs, Deepstory evidence files), treat them as the primary source.

## Steps to follow
1. Profile columns: types, missing, duplicates, outliers, inconsistent labels.
2. Propose rules for each issue.
3. Keep a change log.
4. Provide code or formulas.
5. Report what could not be fixed.

## Deliver the output in this structure
- Data-quality report
- Cleaning rules
- Code/formulas
- Change log
- Residual issues

## Quality rules
- Never silently drop rows, count and log them.
- Distinguish zero from missing.
- Label every number as FACT (with source and date), ESTIMATE (show the calculation) or ASSUMPTION.
- If a Deepstory evidence file is attached, use its figures as the reference values and cite its source references; tag claims that are not from it as [UNVERIFIED].
- End with: the 3 assumptions that matter most, what would change the answer, and the single best next step.

## Evidence you can attach
- Digital-indicator publication coverage: https://deepstoryresearch.com/data/digital-indicator-coverage-matrix
- Internet use ranking: https://deepstoryresearch.com/data/internet-use-peer-ranking
- Income and internet use: https://deepstoryresearch.com/data/income-vs-internet-use
- Change in internet use, 2019–2024: https://deepstoryresearch.com/data/internet-use-change-2019-2024

---
Deepstory methods are process guidance for AI tools. Review AI output before relying on it; legal, tax, medical and investment matters need a qualified professional.
