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
.
This exercise is part of the course
Sampling in Python
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Create a pandas Series from the loudness column of spotify_population
loudness_pop = ____
# Sample 100 values of loudness_pop
loudness_samp = ____
print(loudness_samp)