Preparation 20% Analysis&Modeling Time spent wrangling and cleaning data Timespenton actualinsights "The world is messy, and data reflects that mess with perfect fidelity" Key Insight: Great algorithms can't fix bad data. Data wrangling is the bridge between chaos and insight. Generated by error-prone systems and humans Collected from dozens of disconnected sources No standardization across databases Sensors drift, users make typos, APIs change formats Why Data is Messy
Transform, Load) Modern Reality: Data is now loaded raw into data lakes, where analysts wrangle it on-demand for specific needs more agile than traditional ETL approaches The comprehensive end-to-end process of making data usable for analysis transforming raw chaos into structured insights The "grimy" technical work of transforming formats, rooted in hacker culture the hands-on cleaning and reshaping Traditional IT approach with rigid, scheduled pipelines is now evolving to ELT, where data is loaded raw and transformed on-demand
Discovery 02 Structuring 05 Validating 03 Cleaning Standardize formats and values, remove duplicates, handle missing data and outliers 04 06 Enriching Publishing Check format compliance, verify logical consistency, and confirm statistical distributions Locate data across systems, profile structure and quality, assess scope of cleanup needed Add external data sources, combine transactional + contextual data for deeper insights Deliver to target systems, document transformations, and create data dictionaries Parse unstructured strings, reshape data (pivot/melt) for analysis, join disparate datasets
was trained on historical data that was male dominant so the system learned to penalize resumes that mentioned "women." The project had to be scrapped entirely. Real-World Failures The Impact Target's Canada Expansion Unit-of-measure errors (inches vs. centimeters) led to wrong products shipped, billions in losses, and eventual market exit. Healthcare Algorithm Bias Used "healthcare spending" as proxy for "health needs," assigning lower risk scores to Black patients due to systemic access barriers. The lesson is that "Garbage In, Garbage Out". None of the algorithms are capable of compensating for incomplete input data. Lost marketingspend Supply chain errors Bad strategic decisions Destroyed stakeholder trust Average per organization according to Gartner $15M Annual Cost
Fill 3 ML Imputation 4 5 Why Data Goes Missing Sensor failures Optional form fields Software updates breaking schemas Users choosing not to provide information Predict based on other variables Fill with average(distorts distribution) Use last known value(time-series only) Gold standard- creates uncertainty estimates Remove incomplete rows (loses valuable data) Missing Completely at Random No relationship to any data. Safe to delete rows, but rare in practice. Critical Insight: How you fill a blank cell is a modeling decision that fundamentally changes your analytical reality Missing Not at Random The value itself causes missingness (e.g., high earners hiding income). Most dangerous type. Missing at Random Related to observed data (e.g., women less likely to report age). Complex to handle. Multiple Imputation Mean/MedianImputation MCAR MNAR MAR
Strategies Is this data point an error to remove or a crucial pattern to investigate? Isolation Forests anomalies are easier to isolate from normal points Z-score analysis utilizes the standard score to quantify the distance of a specific data point from the mean in terms of standard deviations. Box plots, scatter plots never underestimate visualization This method works when your data isn't distributed. You can spot outliers by checking if values fall below Q1 - 1.5×IQR or above Q3 + 1.5×IQR If confirmed as a data entry error Cap values at percentile (e.g., 99th) Use robust methods (median vs. mean) Context is Everything: In fraud detection, the outlier IS the goal. In sales forecasting, it's often noise. Always investigate before deciding. Z-Score Analysis VisualInspection Machine Learning Interquartile Range Keep Delete Winsorize
Criteria OpenRefine great pattern matching Hard to automate, not scalable Python / R Alteryx / Trifacta Massive scale,cloud Visual, immediate, easy No reproducibility, crashes with big data Specialized for cleaning, Powerful, flexible, free, reproducible Requires programming skills Team Skills Data Volume Budget Reproducibility Automation Bottom Line: Use what works for your context tool dogmatism is pointless. The best tool is the one your team can & use actually effectively use. Visual workflows, AI suggestions, democratizes access Expensive licenses, vendor lock-in
Standardize format (YYYY-MM-DD) Handle invalid dates Fix timezone issues Calculate current age Create "Generation" category Add "Is_Birthday_This_Month" flag Compute "Days_Since_Last_Birthday" Two different activities with distinct goals understanding the difference is critical for success Aspect Goal Mindset Activity Question Timing Data Wrangling Fidelity & Truth Detective & Janitor Fix errors, standardize "Is this accurate?" First Feature Engineering Predictive Power Domain Expert & Inventor Create new variables "What predicts the outcome?" Second Can't build good features on dirty data Clean data alone won't reveal complex patterns Both are essential. Both require different skills. Master both to excel in data science. Example: Date of Birth Field The Critical Sequence Wrangle First Wrangling Feature Engineering Engineer Second
LLM-Powered Tools Rigid rule-based transformations Manual mapping tables required Can't handle semantic ambiguity Fuzzy normalization without lookup tables, context-aware error detection, leverages world knowledge Goal-driven workflows like "Prepare sales data for Q4 analysis"4 autonomous planning, execution, and self-correction Semantic understanding of context Knows "Code Ninja" = "Software Engineer" Detects contextually wrong data ($1 car) Critical Requirements: Data lineage to track every AI decision, auto-generated documentation (verified by humans), and governance for explainability in audits AI handles tedious execution while humans provide judgment and domain expertise4supervision instead of manual labor The vision for time spent The future of data work Reality Check: We're getting closer to this vision, but human judgment remains essential for complex decisions and domain context. Example: "Convert CA, Calif, California ³ CA" Example: "Standardize job titles" (no mapping needed) Semantic Cleaning Agentic AI Human - on -th e -Lo op 20% Wrangling 80% Insight