import pandas as pd
dataset = pd.read_csv("E:\data\cal_housing.csv")
print("Dataset: {}".format(dataset.shape))
print("Columns: {}".format(dataset.columns))
dataset.head(5)
import matplotlib.pyplot as plt
import seaborn as sns
sns.scatterplot(x = 'd', y = 'e', data = dataset)
# 直方图
plt.figure(figsize = (12, 8))
sns.distplot(a = dataset['h'], bins = 10, hist = True)
plt.title("Density and histogram plot for Median house value")
plt.xlabel("Median house value")
plt.ylabel("Value")
plt.figure(figsize = (12, 8))
sns.heatmap(dataset.corr(), annot = True)
sns.jointplot(x = "d", y = "e", data=dataset, kind="reg", height = 8, color = 'g')
plt.xlabel("Total rooms")
plt.ylabel("Total bedrooms")
sns.pairplot(dataset)