開始使用免費開始

這些發現可以推廣嗎?

讓我們再看另一個樣本,判斷它是否能代表整體母體。這次你要查看 Spotify 資料集的 duration_minutes 欄位,裡面是歌曲的長度(分鐘)。

spotify_populationspotify_mysterious_sample2 已可使用;pandasmatplotlib.pyplotnumpy 也都已用標準別名載入。

本練習屬於課程

Python 中的抽樣

檢視課程

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# Visualize the distribution of duration_minutes as a histogram
spotify_population['duration_minutes'].hist(____)
plt.show()
編輯並執行程式碼