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.
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:
Filter out all chocolate bars with more than 70%
cocoa content.
Which companies produce these high cocoa percent chocolates? (SELECT ALL THAT APPLY) :
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:
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:
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:
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:
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 :
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.
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.