DataLens

Pandas Project: Toko Kita's half-year review

Three graded tasks on the shop's real exports. Build the monthly revenue table for management, a one-row-per-customer summary for marketing, and a restock list from a messy warehouse count.

Track project

Open the project

A realistic brief and graded tasks that use the whole track. Included with Pro.

The brief

Toko Kita is a small Indonesian online shop that sells coffee, kitchen equipment, stationery, home goods and a few electronics. It's the start of July, and the first half of 2024 is over. Everyone wants to know how it went, and you're the one with pandas.

Three requests have landed on your desk. Management wants revenue per month and category in one table. Marketing wants to know who the customers are and how often they come back. And the warehouse has sent a stock count typed up by two different people in two different cities, which needs cleaning before anyone can decide what to reorder. Each task leans on a different part of the pandas track: grouping and pivoting, aggregation with named columns, and cleaning and merging.

How the tasks work

Each task is checked automatically, like the module questions. The tickets say what the result must contain, with exact names, but not which methods to use, and there's usually more than one good way. There are hints if you get stuck, but try each task without opening the solution first.

The tasks

#TaskMain skills
1Monthly revenue reportFiltering, dates, pivot_table, idxmax
2Customer summarygroupby with named aggregations, sorting, shares
3A restock list from a messy countString cleaning, drop_duplicates, merge

The data

sales.csv is the order export from January to June 2024. Every row is one line of an order (one product), so an order with three products takes three rows that share an order_id. The columns are:

order_id, order_date, customer, city, segment, product, category, quantity, unit_price, revenue, channel, status

status is completed, shipped, pending or cancelled, and only completed rows count as sales in this review.

stock_count.csv is the warehouse count from the end of June, with the columns product, warehouse, counted_on, qty. Task 3 describes what's wrong with it.

When you're ready, open Task 1.

Open the project

A realistic brief and graded tasks that use the whole track. Included with Pro.