BaşlayınÜcretsiz Başlayın

Using margins in pivot tables and making a bar plot

You just learned the margins functionality of pivot_table().

Setting margins = True while using pivot_table() returns the aggfunc of the whole value, i.e., is the aggfunc of the value not conditioned on its index.

In this exercise, you will practice what you've learned. You will make a plot where you prepare the data using pivot_table() and also make use of the margins functionality.

A pandas DataFrame called dataset has been loaded for you. pandas and Seaborn have been loaded with the aliases pd and sns respectively.

Bu egzersiz

Analyzing Financial Statements in Python

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Print the columns of the dataset
____
Kodu Düzenle ve Çalıştır