best attempt at nearest neighbor

Close, but not quite finished. Got a neighbor from the test data for each item in the training data, but need to then predict a label. Unsure of accuracy of the other work, as a certain value seemed to crop up more often than made sense.
I think your test data should be the outer loop and the training should be the inner loop... right? The goal is to find the row in the training data that is closest to each row in the testing data.

Perhaps a more clear wording: "for each row in the testing data, find the closest row in the training data".