image_output_11.png image_output_5.png image_output_7.png image_output_4.png image_output_8.png image_output_6.png image_output_12.png image_output_3.png image_output_2.png image_output_1.png image_output_10.png image_output_9.png
import matplotlib.pyplot as plt

import numpy as np

import pandas as pd

import seaborn as sns

df = pd.read_csv('../input/red-wine-quality-cortez-et-al-2009/winequality-red.csv')

df.shape

df.quality.unique()

df.quality.value_counts(ascending=False)

def diagnostic_plots(df, variable, target):
    pass

corr = df.corr()
plt.figure(figsize=(20, 9))
k = 12 #number of variables for heatmap
cols = corr.nlargest(k, 'quality')['quality'].index
cm = np.corrcoef(df[cols].values.T)
sns.set(font_scale=1.25)
hm = sns.heatmap(cm, cbar=True, annot=True, square=True, fmt='.2f', annot_kws={'size': 10}, yticklabels=cols.values, xticklabels=cols.values,cmap="Blues")
plt.show()

df.isnull().sum()

diagnostic_plots(df, 'fixed acidity', 'quality')