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

Contenu du cours

Pandas: First Steps

Pandas: First Steps

1. Getting Started
2. Basics of Dataframes

book
Task: Weekly Coffee Sales Report

Tâche

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 desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. Chapitre 4
toggle bottom row

book
Task: Weekly Coffee Sales Report

Tâche

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 desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. Chapitre 4
Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Nous sommes désolés de vous informer que quelque chose s'est mal passé. Qu'est-il arrivé ?
some-alt