text_html_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/stroke-prediction-dataset/healthcare-dataset-stroke-data.csv')

df.drop('id', axis=1, inplace=True)

df.gender.value_counts()

df = df[df.gender != 'Other']

df.age.value_counts().iloc[-15:]

df = df[df.age > 18]

df.smoking_status.value_counts()

df.Residence_type.value_counts()

df[df.bmi.isna()]

df = df[df.bmi > 15]
df = df[df.bmi < 70]

corr = df.corr()
sns.heatmap(corr, annot=True, linewidths=0.5)
plt.show()