Course Content
Pandas: First Steps
Pandas: First Steps
Introduction to PandasSeriesTask: Coffee Orders SeriesTask: Barista's Favorites CoffeesAccessing Elements from a SeriesTask: Drink of the HourTask - Signature DrinksTask: Mid-Morning SpecialsTask - Fetching the Mid-Shift DrinksOperations over SeriesTask: Modifying a single elementTask: Modifying the Entire SeriesTask: Modifying Part of a SeriesTask: Processing the Restock of Inventory
Task - Signature Drinks
Task
Swipe to start coding
At CafΓ© Pandasia, every barista has their own specialty drink β the one theyβre best at making! The manager wants to organize this data so that each baristaβs name is used as a label, and their signature drink is the value.
Letβs help them make a neat pandas.Series
using custom indices.
- Create a Series from the drinks list, using the
baristas
list as custom indices. - Store the Series in a variable in a variable called
specialities
. - Print the speciality drink of
"Chloe"
in a new variable calledchloes_drink
. - Print the speciality drink of
"Chloe"
via Custom Indexing.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 7
Task - Signature Drinks
Task
Swipe to start coding
At CafΓ© Pandasia, every barista has their own specialty drink β the one theyβre best at making! The manager wants to organize this data so that each baristaβs name is used as a label, and their signature drink is the value.
Letβs help them make a neat pandas.Series
using custom indices.
- Create a Series from the drinks list, using the
baristas
list as custom indices. - Store the Series in a variable in a variable called
specialities
. - Print the speciality drink of
"Chloe"
in a new variable calledchloes_drink
. - Print the speciality drink of
"Chloe"
via Custom Indexing.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 7