1. 学习
  2. /
  3. 课程
  4. /
  5. Sampling in Python

Connected

练习

Simple sampling and calculating with NumPy

You can also use numpy to calculate parameters or statistics from a list or pandas Series.

You'll be turning it up to eleven and looking at the loudness property of each song.

spotify_population is available and numpy is loaded as np.

说明 1 / 共 2 个

undefined XP
    1
    2
  • Create a pandas Series, loudness_pop, by subsetting the loudness column from spotify_population.
  • Sample loudness_pop to get 100 random values, assigning to loudness_samp.