Preparing Data with AI
Knowledge
Why Data Preparation Matters
In practice, analysts spend about 60-80% of their time preparing data -- not on the actual analysis. Incomplete entries, inconsistent formats, duplicates, and typos often make raw data unusable. AI can significantly accelerate this time-consuming process.
The Three Phases of Data Preparation
1. Import and Capture
AI tools can load and merge data from various sources:
- Table formats: Upload CSV, Excel, Google Sheets directly
- Unstructured sources: PDFs, emails, or websites -- AI extracts relevant data
- APIs and databases: Automated retrieval from existing systems
- Images and scans: OCR-powered recognition of tables in scanned documents
*Practical Tip: Provide Context
When loading data into an AI tool, always describe the context: "These are monthly sales figures from our three branches since 2023. The 'Revenue' column is in euros." The more context, the better the results.
2. Cleaning
AI automatically detects common data problems:
- Missing values: Identify empty cells and fill them meaningfully or flag them
- Duplicates: Find duplicate entries, even with slightly different spellings (e.g., "Munich" vs. "Muenchen" vs. "Mnich")
- Format inconsistencies: Standardize date formats (01/03/2026 vs. 2026-03-01 vs. March 1, 2026)
- Outliers: Detect unusual values that may indicate input errors
3. Structuring
After cleaning, AI brings the data into an analyzable form:
- Categorization: Convert free-text fields into standardized categories
- Normalization: Standardize units (km/miles, EUR/USD)
- Enrichment: Add missing information (e.g., mapping zip codes to city names)
- Pivoting: Transform data into the appropriate format for the planned analysis
!Don't Forget Quality Checks
AI-based cleaning is powerful but not perfect. Spot-check whether the automatic corrections make sense. Especially with business-critical data, you should validate the results before building on them.
Understanding
Typical Prompts for Data Preparation
Good prompts for data preparation are precise and describe the desired result:
- "Analyze this CSV file and show me a data quality overview: missing values per column, duplicates, and obvious formatting errors."
- "Standardize the date formats in column C to DD/MM/YYYY and flag all entries that could not be converted."
- "Categorize the free-text responses in the 'Feedback' column into the groups: Praise, Criticism, Improvement Suggestion, Other."
Workflow: From Raw Data to Clean Data
Data Preparation Step by Step
Click a step to see details
Application
Take an existing Excel spreadsheet or CSV file and load it into an AI tool of your choice. Ask the AI for a quality report: "Analyze this data and show me all quality issues." Compare the results with what you find through manual inspection. You'll discover that AI often finds problems that are missed during manual review -- but also sometimes makes incorrect assumptions.
Reflection
Data preparation is the foundation of every good analysis. AI makes this process faster and more thorough but doesn't replace professional judgment. In the next section, we'll look at how you can turn prepared data into meaningful visualizations.