Importing Libraries and Dataset
Here we are using
- Pandas – To load the Dataframe
- Matplotlib – To visualize the data features i.e. barplot
- Seaborn – To see the correlation between features using heatmap
Python3
import pandas as pd import matplotlib.pyplot as plt import seaborn as sns dataset = pd.read_excel( "HousePricePrediction.xlsx" ) # Printing first 5 records of the dataset print (dataset.head( 5 )) |
Output:
As we have imported the data. So shape method will show us the dimension of the dataset.
Python3
dataset.shape |
Output:
(2919,13)
House Price Prediction using Machine Learning in Python
We all have experienced a time when we have to look up for a new house to buy. But then the journey begins with a lot of frauds, negotiating deals, researching the local areas and so on.