MulaiMulai sekarang secara gratis

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.

Latihan ini adalah bagian dari kursus

Sampling in Python

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Create a pandas Series from the loudness column of spotify_population
loudness_pop = ____

# Sample 100 values of loudness_pop
loudness_samp = ____

print(loudness_samp)
Edit dan Jalankan Kode