Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Creating data frames
Feature engineering
Summary

Instruction

Great! Now we can overwrite the default value with "low" for houses priced under or equal to 90 000 EUR, like this:

houses[price <= 90000,]$price_category <- "low" 

We used the condition to filter low-priced houses and assigned the value "low" to those filtered rows. Change the price_category values for the remaining categories.

Exercise

For each property whose price is greater than 90 000 EUR and less than or equal to 120 000 EUR, assign a value of "medium" to price_category. For each property whose price is greater than 120 000 EUR, assign a value of "high" to price_category.