Screen Link:

My Code:

```
for i in ['accommodates','bedrooms']:
for j in ['accommodates','bedrooms','bathrooms','number_of_reviews']:
test_df["predicted_price"] = test_df[i].apply(predict_price, feat_col = j)
test_df["squared_error"] = (test_df["predicted_price"] - test_df["price"])**2
mae = np.abs(test_df["predicted_price"] - test_df["price"]).mean()
mse = test_df["squared_error"].mean()
rmse = mse ** .5
print("MAE for the {}, {} column: {}".format(i, j, mae))
print("RMSE for the {}, {} column: {}".format(i, j, rmse))
print("\n")
```

What I expected to happen:

I’m not sure if there’s a typo in the blog page under the Comparing different models section.

My understanding is that it should look like my code above. Unless the intent is to determine knn as solely based on the accommodates feature

The snippet from the blog is below:

```
for feature in ['accommodates','bedrooms','bathrooms','number_of_reviews']:
test_df['predicted_price'] = test_df.accommodates.apply(predict_price,feature_column=feature)
test_df['squared_error'] = (test_df['predicted_price'] - test_df['price'])**(2)
mse = test_df['squared_error'].mean()
rmse = mse ** (1/2)
print("RMSE for the {} column: {}".format(feature,rmse))
```

Also I’m unclear on how the predict_price function works when it is being applied as a lambda function, it requires two arguments, but somehow runs with only one. Please advise! Thank you!