text_plain_output_1.png
import pandas as pd

df = pd.read_csv('../input/full-filled-brain-stroke-dataset/full_data.csv')

df[['hypertension', 'heart_disease', 'stroke']] = df[['hypertension', 'heart_disease', 'stroke']].astype('object')

print(df['stroke'].value_counts())
no_stroke = df['stroke'].value_counts()[0] / len(df['stroke']) * 100
had_stroke = df['stroke'].value_counts()[1] / len(df['stroke']) * 100
print('\nRatio of the people who had no stroke: %.2f%%' % no_stroke)
print('Ratio of the people who had stroke: %.2f%%' % had_stroke)