Applied Data Analysis in Python
In [1]:
from pandas import DataFrame
from sklearn.datasets import load_iris
iris, iris_target = load_iris(as_frame=True, return_X_y=True)
iris.head()
Out[1]:
In [2]:
corr = iris.corr()
In [3]:
%matplotlib inline
import seaborn as sns
sns.heatmap(corr, vmin=-1.0, vmax=1.0, cmap="RdBu")
Out[3]:
In [4]:
from pandas.plotting import scatter_matrix
a = scatter_matrix(iris, figsize=(16, 16), c=iris_target)