
Clean a messy fitness-tracker export in pandas, then find which activities burn the most and last the longest.
You're a product analyst at FitPulse, a fitness-tracker app. The workouts table just landed as a CSV export — sessions.csv — and it's messy: blank cells where a session didn't sync, and the same activity logged as Running, running, and RUNNING. Before any chart can be trusted, the data has to be cleaned.
Six steps, ~3 hours. What you'll practice: handling missing data, transforming columns, filtering, grouping & aggregating, and sorting & ranking.
You'll practice
The workouts export, sessions.csv, is in your workspace. Load it into a DataFrame called sessions.
Take a look once it's loaded — .head() and .info() will show you the blank cells and the messy activity_type values you'll fix over the next two steps.
Done when: sessions is a DataFrame with 22 rows and all 6 columns.
user_id · date · activity_type (messy: stray whitespace + mixed case) · duration_min (has blanks) · calories (has blanks) · distance_km
Because duration_min and calories have blank cells, pandas loads them as float columns.