Skip to content
import pandas as pd
import seaborn as sns
import numpy as np
df = pd.read_csv('rental_data.csv')
# london_flats = df[(df['region'] == 'london') & (df['bedrooms'] == 2)]

# print(london_flats.groupby('locale').mean()['price'])

london_flats = df[(df['region'] == 'london') & (df['bedrooms'] == 2) & (df['price'] < 2000)]

boroughs = ['westminster-central-london', 'islington-north-london',
       'ealing-london-borough',
       'lambeth-south-west-london', 'greenwich-london-borough',
       'wandsworth-south-west-london', 'camden', 'hammersmith-and-fulham',
       'southwark-south-east-london']

london_flats = london_flats[london_flats['locale'].isin(boroughs)]
london_flats
london_flats[london_flats['locale'] == 'greenwich-london-borough']