Solve this to show you know the material and jump straight to Unit 15. Everything before it counts as cleared.
Fill missing values (NaN) from similar rows. Implement knn_impute(X, k):
distance between two rows uses only the columns both have, as the root of the mean squared difference over those shared columns (rows with no shared columns are infinitely far)
for each missing cell (i, j), take the k nearest other rows that have column j (ties by lower row index) and fill with the mean of their values
impute from the original data, not from already-filled cells