Intermediate · 30 min · 5 steps
Finding which grocery items are bought together
Meenakshi Rao, Lead Merchandising Data Analyst at FreshCart Grocery
It is 1:15 PM on a Wednesday. Meenakshi Rao, who analyses product data for FreshCart Grocery, is called into a meeting with the Chief Commercial Officer. FreshCart is a 15-minute grocery delivery app in 8 big cities in India, with over 90,000 orders a day. Orders have grown fast for two quarters, but the average order value is stuck at ₹280, with only 2.1 items in a basket.
The question
How can we join a basket table to itself in pandas, remove the repeats, and count which pairs of products are bought together most often?
- Market basket analysis
- Pandas merge
- Co-occurrence
- Cross-selling
The rest of this case study is locked
The data, every step with its code and result, and the final answer open with a pass. A few case studies stay free so you can see how they work.