class DataFrame_numerical_Imputer(): def __init__(self): print("numerical_Imputer object created") def KNN_Imputer(self,df): """ This method is for imputation, behalf of all methods KNN imputation performs well, hence this method will helps to impute missing values in dataset """ knn_imputer = KNNImputer(n_neighbors=5) df.iloc[:, :] = knn_imputer.fit_transform(df) return df