Data Science
Feature Engineering Fundamentals
Senior Data Analyst
May 1, 2026
6 min read
What is Feature Engineering?
The art of creating new columns (features) from raw data that help your model learn better.
Examples
# From raw date, create useful features
df['day_of_week'] = df['date'].dt.dayofweek
df['is_weekend'] = df['day_of_week'].isin([5, 6])
# Create ratios
df['price_per_unit'] = df['total_price'] / df['quantity']
# Binning continuous variables
df['age_group'] = pd.cut(df['age'], bins=[0, 18, 35, 60, 100], labels=['Child', 'Young', 'Adult', 'Senior'])
*Day 122: One-Hot Encoding.*