How to calculate mean and standard deviation of all features in a class identified by k-nearest neighbors?
If you append the predicted neighbourhood onto your data df (let's call this neighbourhood), then using groupby and transform within a loop should do the trick.

As an example:

features = [var_1,var_2,...] # a list of the features to run over
for col in features:
  df[col+'_mean'] = df.groupby('neighbourhood')[col].transform('mean')