pandas practice problems

17 problems · 0 solved

pandas is the standard Python library for working with tables of data. It lets you filter, group, join and reshape data in a few lines, and it sits at the start of almost every ML project, from exploring logs to building training sets. These problems use data shaped like real LLM product logs, so you practise the operations you will actually need. You will keep only the latest subscription record per user, summarise API calls per model with named groupby aggregations, join usage to a price table and fill missing prices with a default, pivot repeated eval runs into a model by benchmark table, resample a request log to hourly traffic with zero-filled gaps, and compute a three-day calendar rolling error rate per model when some days are missing. Start with the Easy problems on deduplication and groupby. Then do the join and pivot problems, and finish with resampling and time-based rolling windows, where date handling gets tricky. Many interviews for data and ML roles include a live pandas task, and being fluent here saves a lot of time when you need quick answers from messy data at work.

Easy 5

Medium 7

Hard 5

Related topics

All practice problems