text_plain_output_1.png image_output_1.png
import matplotlib.pyplot as plt

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

import seaborn as sns

train_df = pd.read_csv('/kaggle/input/applai-workshop-a1/Training Data - Training Data.csv')
train_df

train_df.isna().sum()

train_df.isna().sum()

train_df['coordinates'] = list(zip(train_df.longitude, train_df.latitude))
train_df

house_train_ids = train_df['HouseID']
train_df = train_df.drop(['longitude', 'latitude', 'coordinates', 'HouseID'], axis=1)

import seaborn as sns
import matplotlib.pyplot as plt
corr_matrix = train_df.corr(method='pearson')
sns.heatmap(corr_matrix, vmin=-1.0, vmax=1.0, annot=True, fmt='.2f', cmap='YlGnBu', cbar=True, linewidths=0.5)
plt.title('pearson correlation')