text_plain_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

data = pd.read_csv('../input/heart-attack-analysis-prediction-dataset/heart.csv')

data.describe().T

data.isnull().sum()

duplicate = data[data.duplicated()]

data.drop_duplicates(inplace=True)

data = data.reset_index(drop=True)

plt.figure(figsize=(12, 6))
sns.set(style='darkgrid')
ax = sns.countplot(y='output', data=data, palette='viridis')
ax.set_yticklabels(['Less Chance', 'Higher Chance'])
plt.ylabel('Chance to Have Heart Attack')
plt.xlabel('Number of Person')
plt.title('Output distribution', fontsize=20, loc='center')
plt.show()