1. Learn
  2. /
  3. 课程
  4. /
  5. Python 抽样

Connected

道练习

这些结论可以推广吗?

我们再看一个样本,判断它是否能代表总体。这一次,您将查看 Spotify 数据集中的 duration_minutes 列,其中包含歌曲的时长(分钟)。

已提供 spotify_population 和 spotify_mysterious_sample2;pandas、matplotlib.pyplot 和 numpy 已按常用别名加载。

说明 1 / 共 3 个

undefined XP
    1
    2
    3
  • 使用 pandas 的 .hist(),对 spotify_population 的 duration_minutes 绘制直方图,设置箱宽为 0.5,范围从 0 到 15。