Data Preparation for Data Sciences
Data preparation is the work done before modelling: collecting data from files, databases and APIs, cleaning missing values, duplicates and wrong types, and creating features that help a model learn. It usually takes the largest share of a project's time and has a direct effect on model quality.
Stage: Data Wrangling and Exploration · Part of the Data Science roadmap · Last reviewed 19 November 2026
What to learn in Data Preparation
- Handle missing values with deletion, imputation or an explicit missing indicator
- Detect and treat outliers without discarding real signal
- Encode categorical variables using one-hot or target encoding appropriately
- Scale numeric features and know which models need it
- Build date-based and aggregated features without leaking future information
Data Preparation interview questions
What is data leakage and how does it appear in feature engineering?
Leakage happens when training uses information that would not be available at prediction time, such as a feature computed from future data or from the target itself. It inflates validation scores, then the model fails in production. Split by time and fit transforms on training data only.
When is mean imputation a bad choice?
Mean imputation shrinks variance and hides the fact that values were missing, which can bias relationships. It is risky when missingness is large or informative. Consider model-based imputation, a missing flag, or models that handle missing values natively.
Where Data Preparation fits in the Data Science roadmap
Data Preparation belongs to the Data Wrangling and Exploration stage (intermediate level), which takes about 5 hours. Know your data.
Other units in this stage
Back to the full Data Science roadmap