MulaiMulai sekarang secara gratis

Making a count plot with a list

In the last exercise, we explored a dataset that contains information about 227 countries. Let's do more exploration of this data - specifically, how many countries are in each region of the world?

To do this, we'll need to use a count plot. Count plots take in a categorical list and return bars that represent the number of list entries per category. You can create one here using a list of regions for each country, which is a variable named region.

Latihan ini adalah bagian dari kursus

Introduction to Data Visualization with Seaborn

Lihat Kursus

Petunjuk latihan

  • Import Matplotlib and Seaborn using the standard naming conventions.
  • Use Seaborn to create a count plot with region on the y-axis.
  • Display the plot.

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Import Matplotlib and Seaborn



# Create count plot with region on the y-axis
____.____(y=____)

# Show plot
Edit dan Jalankan Kode