Error...What can I do?

def predict_price_multivariate(new_listing_value,feature_columns):
temp_df = norm_train_df
temp_df[‘distance’] = distance.cdist(temp_df[feature_columns],[new_listing_value[feature_columns]])
temp_df = temp_df.sort_values(‘distance’)
knn_5 = temp_df.price.iloc[:5]
predicted_price = knn_5.mean()
return(predicted_price)cols = [‘accommodates’, ‘bathrooms’]

File “”, line 7
return(predicted_price)cols = [‘accommodates’, ‘bathrooms’]
^
SyntaxError: invalid syntax

1 Like

Hi @AndrianAriana:

Do you mind providing a question link and formatting your code properly as per these guidelines so that we can better assist you? Thanks!

1 Like