BuildlyBuildly
DashboardExercisesProfileHelp

Steps

0 / 6
0 / 410 XP

FitPulse Session Cleanup

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

Data Cleaning in pandasHandling Missing DataGrouping & AggregationSorting & Ranking
Loading kernel…
1

Load the export

40 XP

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.

sessions.csv — 22 rows, 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.

Lena

Ask Lena

Product Analyst at FitPulse (fitness-tracker app)

Currently on: Step 1. Load the export
Lena

Hey, I'm Lena — Product Analyst at FitPulse (fitness-tracker app). I'll be working with you on this scenario. Ask me anything — about the data, the brief, the current step, or your code. I won't dump the answer on you, but I'll absolutely point you in the right direction.