Data Cleaning Step by Step
A lightweight execution-visualization book.
Missing Values
Detect Missing
Drop Missing Rows
Fill with Constant
Fill with Column Mean
Types and Parsing
Cast Numeric Strings
Coerce Bad Numbers
Parse Boolean Labels
Parse Formatted Numbers
String Cleaning
Strip Whitespace
Normalize Case
Replace Substring
Split Text Column
Dates
Parse Date
Extract Year and Month
Date Difference
Duplicates
Find Exact Duplicates
Drop Duplicates — Keep First
Dedup by Key — Keep Latest
Outliers and Ranges
Range Flag
Clip Values
IQR Outlier Flags
Z-Score Flag
Categorical Encoding
Map Category Spellings
Label Encode
One-Hot Encode Small
Collapse Rare Categories
Validation Pipelines
Validate Required Columns
Validate Value Ranges
Validate Unique Key
Validate Allowed Values
Validate Required Values
Regex Validate
Clean and Summarize
Feature Engineering
One-Hot Encoding
Numeric Bins
Missing Indicator
Weekend Flag
Rate Feature