LoslegenKostenlos loslegen

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.

Diese Übung ist Teil des Kurses

Working with Categorical Data in Python

Kurs anzeigen

Anleitung zur Übung

  • 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 the reviews dataset.

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

# Set the font size to 1.25
sns.____(____)

# Set the background to "darkgrid"
sns.____(____)

# Create a boxplot
sns.catplot(____)

plt.show()
Code bearbeiten und ausführen