Task: Weekly Coffee Sales Report
Swipe to start coding
At Café Pandasia, the baristas have been keeping track of how many cups of each coffee drink were sold over the past week.
Now, the manager wants to see the data stored in a DataFrame to get a quick overview of performance and use it later for analysis.
You’ve been given the sales numbers for three drinks across five days (Monday to Friday):
Coffee | Monday | Tuesday | Wednesday | Thursday | Friday |
---|---|---|---|---|---|
Espresso | 45 | 38 | 50 | 42 | 55 |
Latte | 60 | 65 | 62 | 58 | 70 |
Cappuccino | 30 | 28 | 35 | 40 | 38 |
- Use the Dictionary of Lists method to create a pandas DataFrame with the data given above.
- Set the index list of the DataFrame to be the coffee drink names:
Espresso
,Latte
andCappuccino
respectively.
Lösning
Tack för dina kommentarer!
single
Fråga AI
Fråga AI
Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal
Sammanfatta detta kapitel
Explain code
Explain why doesn't solve task
Awesome!
Completion rate improved to 2.7
Task: Weekly Coffee Sales Report
Svep för att visa menyn
Swipe to start coding
At Café Pandasia, the baristas have been keeping track of how many cups of each coffee drink were sold over the past week.
Now, the manager wants to see the data stored in a DataFrame to get a quick overview of performance and use it later for analysis.
You’ve been given the sales numbers for three drinks across five days (Monday to Friday):
Coffee | Monday | Tuesday | Wednesday | Thursday | Friday |
---|---|---|---|---|---|
Espresso | 45 | 38 | 50 | 42 | 55 |
Latte | 60 | 65 | 62 | 58 | 70 |
Cappuccino | 30 | 28 | 35 | 40 | 38 |
- Use the Dictionary of Lists method to create a pandas DataFrame with the data given above.
- Set the index list of the DataFrame to be the coffee drink names:
Espresso
,Latte
andCappuccino
respectively.
Lösning
Tack för dina kommentarer!
Awesome!
Completion rate improved to 2.7single