Feature Engineering Interview Questions for Data Science
32 Feature Engineering questions with answers for data science roles — 9 easy, 17 medium, 6 hard.
About Feature Engineering
Feature engineering questions test how you turn raw data into useful model inputs: encoding categoricals, handling skew and outliers, dates, text and location features, aggregations and time-aware features. Interviewers focus on leakage and training-serving skew, because these silently break models. Good features often matter more than the choice of algorithm, so this topic carries real weight.
What is the difference between one-hot, label and ordinal encoding?
Show answer
Write Pandas code to create useful features from a datetime column.
Show answer
What is binning and when is it useful?
Show answer
Why do you apply a log transform to some features?
Show answer
How do you handle rare categories in a categorical feature?
Show answer
Write Pandas code to encode hour of day as a cyclical feature.
Show answer
Write Pandas code to cap outliers at the 1st and 99th percentile.
Show answer
In production your model receives category values, like a new payment method, that never appeared in training. What happens and how do you handle it?
Show answer
How do you perform feature selection?
Show answer
What is feature scaling and which models need it?
Show answer
How do you deal with high-cardinality categorical features?
Show answer
You target-encoded a city column and validation AUC jumped from 0.72 to 0.95. What do you suspect?
Show answer
Write Pandas code to create lag and rolling features for each customer.
Show answer
What are interaction features and when do they help?
Show answer
Your model's most important feature is customer_id. What is wrong?
Show answer
How do you turn text columns into features for a tabular model?
Show answer
Write a scikit-learn ColumnTransformer that preprocesses numeric and categorical columns.
Show answer
What is recursive feature elimination?
Show answer
How would you build RFM features for a customer churn model?
Show answer
How do you work with domain experts to find good features?
Show answer
Write Python code to compute the haversine distance between customer and store locations.
Show answer
After one-hot encoding you have 2,000 features and training is slow. What do you do?
Show answer
Tell me about a feature you engineered that significantly improved a model.
Show answer
What are polynomial features and what is the risk of using them?
Show answer
What are quantile and power transforms such as Box-Cox and Yeo-Johnson, and when do you use them?
Show answer
What is multicollinearity and how do you handle it?
Show answer
You need to use a device_id column with millions of unique values in a streaming model. How would feature hashing help?
Show answer
A feature works well offline but is not available at prediction time in production. How do you handle this?
Show answer
How do you engineer features for a time series forecast without leaking future information?
Show answer
Tree feature importance ranks an ID-like numeric column near the top. Why, and which importance method would you trust instead?
Show answer
Write Pandas code to compute each customer's average order value excluding the current order.
Show answer
Frequently asked questions
How important is Feature Engineering in Data Science interviews?
Feature engineering questions test how you turn raw data into useful model inputs: encoding categoricals, handling skew and outliers, dates, text and location features, aggregations and time-aware features. Interviewers focus on leakage and training-serving skew, because these silently break models. Good features often matter more than the choice of algorithm, so this topic carries real weight.
How should I use the Feature Engineering sheet?
Go top to bottom — easy to hard. Answer before opening each answer, tick what you solved and save misses to Last-Minute Revision.