Cocoa Curations: Series Filtering with Chocolate Ratings
Cocoa Curations: Series Filtering with Chocolate Ratings Data Science Project
Intro to Pandas for Data Analysis

Cocoa Curations: Series Filtering with Chocolate Ratings

This project will guide you through mastering series filtering techniques using the Flavors of Cocoa dataset. You'll explore filtering, Boolean indexing, and work with multiple conditions to analyze data about chocolate bars, their ratings, and characteristics. Whether you're a chocolate lover or just intrigued by data, this project will take you on a flavorful journey through the art of chocolate making while sharpening your data analysis skills.
Start this project
Cocoa Curations: Series Filtering with Chocolate RatingsCocoa Curations: Series Filtering with Chocolate Ratings
Project Created by

Vidhi Shah

Project Activities

All our Data Science projects include bite-sized activities to test your knowledge and practice in an environment with constant feedback.

All our activities include solutions with explanations on how they work and why we chose them.

multiplechoice

Which of the following methods is used to find the `top 5` chocolates based on their `Rating`?

codevalidated

Identify Low-Rated Chocolate Bars

Create a series of count of chocolates with a Rating below 2.

Count them using the count() method.

Store the result in a variable named low_rated_count.

Your result would look something like this:

img2

multiplechoice

High Cocoa Percent Chocolates

Filter out all chocolate bars with more than 70% cocoa content.

Which companies produce these high cocoa percent chocolates? (SELECT ALL THAT APPLY) :

codevalidated

Count Chocolates Above Average Rating

Calculate the mean rating of all chocolate bars and then create a series of chocolate bars that have a rating higher than the average and count them using the count() method.

Store the result in a variable named above_avg_chocolates.

Your result would look something like this:

img4

codevalidated

Identify Beans with High Cocoa and High Rating!

Create a series of specific bean origin of chocolate bars that have a Cocoa\nPercent higher than 60 and a Rating of at least 4.0.

Store the result in a variable named filtered_chocolates_series.

Your result would look something like this:

img5

codevalidated

Count Extreme Chocolates

Create a series of count of how many chocolate bars either have a Rating lower than 2 or a Cocoa\nPercent higher than 90.

Store the result in a variable named extreme_chocolates.

Your result would look something like this:

img6

multiplechoice

What is the correct syntax to filter chocolates with a rating greater than `4.5` and a cocoa percentage less than `70%`?

codevalidated

Count High-Rated Venezuelan Chocolates

Create a series of count of chocolate bars whose cocoa beans originated in Venezuela and have a rating higher than 3.5.

Store the result in a variable named venezuela_chocolates.

Your result would look something like this:

img8

codevalidated

Recent High-Rated Bars

Create a series of count of chocolate bars that were reviewed after 2015 and have a rating of 4 or higher.

Store the result in a variable named recent_high_rated_count.

Your result would look something like this :

img9

input

Most Common Bean Origin for Highly Rated Chocolates

Identify the most common broad bean origin for chocolate bars with a Rating above 3.5.

If there are multiple origins with the same highest frequency, the mode() function will return all of them.

In this case, use only the first result as your answer.

codevalidated

Average Rating by Company Location

Calculate the average rating of chocolate bars for each Company\nLocation, but only for locations with at least 10 reviews.

Sort the results in descending order of average rating.

Store the result in a variable named avg_rating_by_location.

Cocoa Curations: Series Filtering with Chocolate RatingsCocoa Curations: Series Filtering with Chocolate Ratings
Project Created by

Vidhi Shah

As a Project Author at DataWars, I dive into the world of data science and AI/ML with a millennial flair, constantly intrigued by the inner workings of technology. While I'm not crunching numbers, you'll find me cheering for my favorite cricket team.

As a Project Author at DataWars, I dive into the world of data science and AI/ML with a millennial flair, constantly intrigued by the inner workings of technology. While I'm not crunching numbers, you'll find me cheering for my favorite cricket team.

This project is part of

Intro to Pandas for Data Analysis

Explore other projects