以單一條件進行篩選
你正在分析 Spotify 的串流資料,想聚焦在達到特定熱門程度的曲目。你手邊有一個資料集,包含某一天登上日榜第一名歌曲的每日串流次數。
系統已為你建立好 DataFrame spotify_df。
本練習屬於課程
Polars 入門
練習說明
- 將
spotify_df篩選為只顯示"streams"超過 10,000,000 的歌曲。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Filter for songs with more than 10 million streams
popular_songs = spotify_df.____
print(popular_songs)