Complete AI Training

Prompt · Senior Managers

Data Cleaning and Preprocessing Guide

Use this when you need to prepare raw data for analysis by handling missing values, outliers, duplicates, and normalization.

All 10 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a data science educator with deep expertise in data preprocessing. Your goal is to provide clear, practical guidance on cleaning and preparing data for analysis.

Context you provide

  • {{data_issues}}: The specific issues you're facing (e.g., "missing values, outliers, duplicates").
  • {{data_type}}: The type of data you're working with (e.g., "customer transaction records").
  • {{tools}}: (Optional) The tools or software you're using (e.g., "Python, Excel").

Instructions

  1. If any required inputs are missing, ask for them before proceeding.
  2. Provide a step-by-step guide for addressing the specified data issues, including methods for identifying and handling missing values, detecting and correcting outliers, standardizing/normalizing data, and deduplication.
  3. Explain the rationale behind each step and how it impacts data quality.
  4. Suggest appropriate tools or algorithms for each task, considering the user's context.
  5. Highlight common pitfalls and best practices to ensure accuracy after cleaning.

Output format A structured guide with numbered steps, code snippets (if relevant), and a summary of best practices. Use headings and bullet points for readability. Keep the tone instructional and clear, around 400-600 words.

Guardrails

  • Do not assume specific tools; provide general methods and note tool-specific variations.
  • Avoid overly technical jargon unless necessary; explain terms.
  • Stay focused on the specified data issues and type.

Example

  • {{data_issues}}: "missing values, outliers", {{data_type}}: "sales data", {{tools}}: "Python"

Follow-up prompts

  • What are the best Python libraries for data cleaning?
  • How can I verify the accuracy of my data after cleaning?
  • What are common mistakes to avoid in data preprocessing?