Week 3 • Wednesday

Block 26: Type Conversion & New Columns

Fix dtypes and engineer new features from existing columns.

Concepts

Code Examples

See exercise below.

Exercise

Add a BMI column to a health dataset using weight and height columns. Convert a 'date' string column to datetime and extract year, month, day.

Homework

Write an apply() function that categorizes a numeric column into 'low', 'medium', 'high' bins. Thursday