```
This will create a new dataframe called filtered_data which pulls data from our main dataframe based on the user's choices. We first remove all rows where the num_rooms value falls outside the user's chosen range (chosen from the double slider) and then remove rows where the user has not included that city.
We can now calculate the mean, median, minimum and maximum prices of the remaining properties. Pandas provides convenient functions for all of these.
Finally, we add a markdown row - equivalent to an <h3> HTML tag to make the aggregate numbers more noticable and show the user this data.
Adding a visualisation
Viewing the aggregate data is useful but doesn't help the user as much as being able to visualise this dataset. Let's add a chart with one point for each property. This will show how properties tend to get more expensive as you add more rooms.
