Вы находитесь на странице: 1из 2

Mumbai_prediction_ML

January 19, 2019

Mumbai Prediction

In [1]: import pandas as pd


import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns

In [2]: mumbai_data = pd.read_csv("nb_data.csv")

Delete redundunt, characters and low cardinal data

In [3]: mumbai_data.drop(["PostedTime", "HouseType", "Address", "Verified", "LoanVerified", "Ne

In [4]: mumbai_data.drop(["SaleType", "MonthlyEMI", "Area2", "propid"], axis=1, inplace = True)

In [5]: mumbai_data.drop(["ShortAddress", "FloorType2", "Measure", "OwnedBy"], axis = 1, inplac

In [15]: mumbai_data.iloc[0:6, 0:]

Out[15]: Lat Long Price Area Bedrooms Bathrooms \


0 19.076170 72.866274 2.15 Crores 1,060 2 bedrooms 2 Baths
1 19.247946 72.856353 1.4 Crores 861 2 bedrooms 2 Baths
2 19.207628 72.837906 85 Lacs 600 1 bedrooms 1 Bath
3 19.095180 72.914583 1.2 Crores 820 2 bedrooms 2 Baths
4 19.117630 72.827957 6.25 Crores 1,800 4 bedrooms 3 Baths
5 19.126236 72.844492 2.1 Crores 950 2 bedrooms 2 Baths

FloorType Balconies Bldgtype Age Maintanance \


0 Vitrified Tiles 0 Balconies Apartment >10 years old 3.3 per sq.ft/m
1 Vitrified Tiles 0 Balconies Apartment >10 years old 3.5 per sq.ft/m
2 Cement 0 Balconies Apartment >10 years old 1.7 per sq.ft/m
3 Vitrified Tiles 0 Balconies Apartment >10 years old 3.7 per sq.ft/m
4 Marble/Granite 0 Balconies Apartment >10 years old 6.7 per sq.ft/m
5 Vitrified Tiles 3 Balconies Apartment >10 years old 5.3 per sq.ft/m

Furnished Facing FloorOn Parking PowerBackup WaterSupply


0 Semi North Floor 3 / 7 Bike and Car NaN Corporation
1 Semi West Floor 3 / 7 Bike and Car NaN Both

1
2 Unfurnished East Floor 5 / 6 Bike and Car Full Corporation
3 Semi East Floor 2 / 6 Bike and Car NaN Corporation
4 Full NaN Floor 6 / 6 Car NaN Corporation
5 Semi West Floor 4 / 7 Car NaN Both

In [16]: mumbai_data['PowerBackup'].value_counts()

Out[16]: Full 1316


None 832
Partial 294
Name: PowerBackup, dtype: int64

Вам также может понравиться