Is there an algorithm that imputes missing values based on n nearest columns? (KNN hybrid)
You can extend scikit-learn's sklearn.impute.KNNImputer. The metric parameter can accept the custom function you described.