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

Multiple Aggregations on a Column

You want to analyze the Spotify streaming data to understand how streaming patterns vary across different years and artists. You start with a basic group-by operation and then expand it to include multiple statistics.

The spotify_df DataFrame is available for you.

Bu egzersiz

Introduction to Polars

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

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

year_artist_means = (
    spotify_df
    # Group by year and artist, calculate average streams
    .group_by(____, ____)
    .agg(____)
)

print(year_artist_means)
Kodu Düzenle ve Çalıştır