A clinic's records have gaps. A three-step pipeline can fill them, scale the columns and classify, all from one fit.
Task: write predict_with_gaps(train_rows, train_labels, new_rows).
None where a value is missing. Turn them into arrays with np.array(rows, dtype=float), which makes each None a np.nan.Pipeline with three steps, in this order:
("fill", SimpleImputer(strategy="median"))("scale", StandardScaler())("model", KNeighborsClassifier(n_neighbors=3))new_rows. New rows can have gaps too.