for feature in categorical_features: temp=dataset.groupby(feature)[\'SalePrice\'].count()/len(dataset) temp_df=temp[temp>0.01].index dataset[feature]=np.w