Hi there, I’m on screen 6 of Introduction to K-nearest neighbors
import numpy as np
np.random.seed(1)
random_order = np.random.permutation(len(dc_listings))
dc_listings = dc_listings.loc[random_order]
Why is loc[]
used here, considering that random_order
is an array of number indexes?