text_plain_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

df = pd.read_csv('/kaggle/input/heart-failure-prediction/heart.csv')

df.shape

df.drop_duplicates()

df.isna().all()

plt.style.use("seaborn")
plt.subplots_adjust(hspace=0.2)
color = 'winter'

fig, axs = plt.subplots(6, 2, figsize=(15,28))
i=1
for feature in df.columns:
    if feature not in ["HeartDisease"] and i < 14:
        plt.subplot(6,2,i)
        sns.histplot(data=df, x=feature, kde=True, palette=color, hue='HeartDisease')
        i+=1

df_corr = df.corr()
df_corr['HeartDisease'].sort_values(ascending=False)

sns.boxplot(data=df, x='Cholesterol')