Best Seller of the Week
Data questions · Intermediate · about 7 min
canteen_week.csv has one row per item per school day: the day, the item and how many were sold. Set answer to the item that sold the most over the whole week, adding up all five days. Write the name exactly as in the file.
Example
The first lines of canteen_week.csv:
day,item,sold Monday,sandwich,44 Monday,samosa,30 Monday,fruit cup,15
canteen_week.csv · 25 rows
| day | item | sold |
|---|---|---|
| Monday | sandwich | 44 |
| Monday | samosa | 30 |
| Monday | fruit cup | 15 |
| Monday | juice | 38 |
| Monday | muffin | 25 |
| Tuesday | sandwich | 41 |
| Tuesday | samosa | 36 |
| Tuesday | fruit cup | 20 |
First 8 of 25 rows.
import pandas as pd
df = pd.read_csv("canteen_week.csv")
answer = None
The solution opens after your first Check.