Practical _Questions_Unit 1 and 2
Practical _Questions_Unit 1 and 2
Item Color
Item1 Red
Item2 Green
Item3 Blue
Item4 Red
Item5 Green
Feature Feature
1 2
5 12
7 NaN
3 8
NaN 15
8 6
10 9
6 NaN
NaN 5
9 11
o Replace the missing values with the mean of their respective
columns.
o Replace the missing values with the median of their respective
columns.
o Replace the missing values using the K-Nearest Neighbors (KNN)
imputation method.
x y
5 5
15 20
25 14
35 32
45 22
55 38