Pebellslearn by building
0%
RoadmapMatrixCatalogSandboxSign in
Fundamental's Follow up Projects  ›  Capstone Project

Project 2 — CSV Data Analyzer

Capstone Project 40 minParse rows, filter, and aggregate — a mini data pipeline
Your task
Build report(lines) over "name,score" lines: return {"count", "average" (2dp), "top": the [name, score] with the highest score, "passing": how many scored >= 60}.

Project 2 — CSV Data Analyzer

Every engineer wrangles tabular data. Here you'll build a tiny "pandas by hand": take rows of "name,score" text, parse them, slice columns, filter, and roll up summary statistics.

Build the four steps below, then assemble report(lines) (Your task) into a one-glance summary: {"count", "average", "top", "passing"}.

  • Step 1 — parse_rows: text lines → typed [name, score] rows.
  • Step 2 — column: select one column out of the rows.
  • Step 3 — filter_rows: keep rows meeting a threshold (a WHERE clause).
  • Step 4 — aggregate: count / sum / avg / min / max.

Skills: string splitting + casting, comprehensions, min/max/sum, guards.

Practice — level up

0/4 solved

Solve each in its own editor — Run to try, Check to grade. Stuck? Reveal a Hint, or the full Solution + walkthrough.

BuildStep 1 — Parse rows

Each line is "name,score". Write parse_rows(lines) returning [[name, score(int)], ...] (name trimmed).

splitcastloop
BuildStep 2 — Extract a column

Write column(rows, index) returning the list of values at position index from every row.

comprehension
BossStep 3 — Filter rows

Write filter_rows(rows, index, minimum) keeping only rows whose value at index is >= minimum.

comprehensionconditionals
BossStep 4 — Aggregate stats

Write aggregate(nums) returning {"count", "sum", "avg", "min", "max"} (avg to 2 dp). Empty → count/sum/avg 0, min/max None.

sum/len/min/maxguarddict
report.py
Call the function you wrote — just like your app's frontend would. Edit the inputs and hit Call.
report(lines) → dictParse rows, filter, and aggregate — a mini data pipeline
try:
returned
No app map for this section yet.
Press Run to execute your code.
Press Check to run the tests for this lesson.
Project 2 — CSV Data Analyzer — Pebells