Creating a box plot
When people leave reviews for products, services, or destinations, people reading those reviews can sometimes mark the original review as helpful. If enough people mark the review as helpful, future readers of these reviews might be more likely to trust the content of the original review.
Using the reviews dataset, explore the continuous variable "Helpful votes" across the different categories found in the "Traveler type" variable.
Note that for the remainder of this chapter, seaborn as sns and matplotlib.pyplot as plt will be preloaded for you.
Deze oefening maakt deel uit van de cursus
Working with Categorical Data in Python
Oefeninstructies
- Set the font size of your graphic to be
1.25. - Set the background of the graphic to be
"darkgrid". - Create a boxplot using
catplot()with"Helpful votes"as the continuous variable split across each"Traveler type". Make sure that you are using thereviewsdataset.
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
# Set the font size to 1.25
sns.____(____)
# Set the background to "darkgrid"
sns.____(____)
# Create a boxplot
sns.catplot(____)
plt.show()