How can i write a python code to manipulate a Restaurant logs?
I have a Task to complete but I'm not sure how should i start.
Problem statement 1: Write python code A restaurant keeps a log of (eater_id, foodmenu_id) for all the diners. The eater_id is a unique number for every diner and foodmenu_id is unique for every food item served on the menu. Write a program that reads this log file and returns the top 3 menu items consumed. If you find an eater_id with the same foodmenu_id more than once then show an error.
I tried using my own data like a csv or json with basic things "customer_id" and "food_id". but I get confused on the read the top food consumed. can anyone give me an idea where can I start and how to get this task done. also I appreciate it anyone share a link or reference of similar script.
- I have to c开发者_开发问答reate a log file which has customer id and food consumed.
- I have to get top food consumed by the customer
- a customer should not have repeated food_id in his top food consumed.
I feel like it's easy to implement but how to start? Thanks.
精彩评论