Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Task: Weekly Coffee Sales Report | Basics of Dataframes
Pandas: First Steps
course content

Course Content

Pandas: First Steps

Pandas: First Steps

1. Getting Started
2. Basics of Dataframes

book
Task: Weekly Coffee Sales Report

Task

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):

CoffeeMondayTuesdayWednesdayThursdayFriday
Espresso4538504255
Latte6065625870
Cappuccino3028354038



  • 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 and Cappuccino respectively.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 2. ChapterΒ 4
toggle bottom row

book
Task: Weekly Coffee Sales Report

Task

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):

CoffeeMondayTuesdayWednesdayThursdayFriday
Espresso4538504255
Latte6065625870
Cappuccino3028354038



  • 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 and Cappuccino respectively.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 2. ChapterΒ 4
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
We're sorry to hear that something went wrong. What happened?
some-alt