text_plain_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import seaborn as sns
import matplotlib.pyplot as plt
df = pd.read_csv('/kaggle/input/house-rent-prediction-dataset/House_Rent_Dataset.csv')

df = df[~(df['Area Type'] == 'Built Area')]
df = df[~(df['Point of Contact'] == 'Contact Builder')]
df = df[~(df['Bathroom'] > 6)]

df['Floor House'] = df['Floor'].str.split(' ').str.get(0)
df['Floor Building'] = df['Floor'].str.split(' ').str.get(-1)
df.drop('Floor', axis=1, inplace=True)

df.loc[df['Floor House'] == 'Ground', 'Floor House'] = 0
df.loc[df['Floor Building'] == 'Ground', 'Floor Building'] = 0
df.loc[df['Floor House'] == 'Lower', 'Floor House'] = 0
df.loc[df['Floor House'] == 'Upper', 'Floor House'] = df.loc[df['Floor House'] == 'Upper', 'Floor Building']
print(df['Floor House'].unique())