Editor

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
dayitemsold
Mondaysandwich44
Mondaysamosa30
Mondayfruit cup15
Mondayjuice38
Mondaymuffin25
Tuesdaysandwich41
Tuesdaysamosa36
Tuesdayfruit cup20

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.