Editor

Python data handling exercises

Group, join, clean and summarise records with plain Python, on problems with tests.

Beginner

  1. 230. The Oldest MemberWho in the club was born first?30 XP5 min
  2. 231. Tickets by CategoryWhich kind of problem keeps the help desk busiest?30 XP6 min
  3. 237. Average Mark per StudentA term's worth of marks in one long list: how is each student doing?35 XP6 min
  4. 242. Restock ListThe shelves are emptying: what should the shop order first?35 XP7 min

Intermediate

  1. 266. Clean Up a Name ListA sign-up sheet full of stray spaces, shouting and repeats60 XP12 min
  2. 268. Errors per HourWhen did things go wrong? Read the server log and find out60 XP10 min
  3. 289. Sales Pivot TableTurn a long list of sales into a table of regions by month65 XP12 min
  4. 293. Top Students in Each SubjectEvery subject has its stars: find them65 XP12 min
  5. 298. Bank Statement With Overdraft FeesRebuild a bank statement line by line, fees and all70 XP14 min
  6. 304. Join Two TablesOrders in one list, customers in another: line them up70 XP14 min
  7. 305. Moving Average With GapsSmooth out a run of readings, even when the sensor skipped a day70 XP14 min
  8. 324. Split Clicks Into SessionsWhen does one visit to a website end and the next one begin?75 XP15 min

Advanced

  1. 344. Latency PercentilesMost requests are fast. How slow are the unlucky ones?115 XP20 min
  2. 357. First In, First Out StockWhich crates did you really sell, and what did they cost you?125 XP25 min
  3. 370. Peak Users OnlineWhen was the chat server at its busiest, and for how long?130 XP25 min
  4. 372. Team Size and PayrollHow many people, and how much salary, sit under each manager?130 XP25 min
  5. 397. Validate Data Against a SchemaFind every way a piece of data breaks the rules, in one pass140 XP30 min
  6. 400. Reconcile the BooksYour records and the bank's never quite agree. What is missing where?145 XP30 min
  7. 401. Settle the Group DebtsAfter the trip, who pays whom so that everyone is even?145 XP30 min
  8. 414. Price Drop AlertsTell shoppers when a price really falls, not every little wobble150 XP30 min

Expert

  1. 447. Resample a Power MeterIrregular meter readings in, a neat table of averages out220 XP45 min
  2. 496. A Tiny SQL EngineTeach a list of records to answer SELECT queries280 XP60 min

Other topics

Or see every challenge, with study plans, today's challenge and duels.