text_plain_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import matplotlib.pyplot as plt
import seaborn as sns
df = pd.read_csv('/kaggle/input/covid19-dataset/Covid Data.csv')

df.loc[df.DATE_DIED != '9999-99-99', 'DATE_DIED'] = 1
df.loc[df.DATE_DIED == '9999-99-99', 'DATE_DIED'] = 2

columns = ['USMER', 'MEDICAL_UNIT', 'SEX', 'PATIENT_TYPE', 'DATE_DIED', 'INTUBED', 'PNEUMONIA', 'PREGNANT', 'DIABETES', 'COPD', 'ASTHMA', 'INMSUPR', 'HIPERTENSION', 'OTHER_DISEASE', 'CARDIOVASCULAR', 'OBESITY', 'RENAL_CHRONIC', 'TOBACCO', 'ICU']

for col in columns:
    print(col, '= 1')
    print('mean:', df[df[col] == 1]['CLASIFFICATION_FINAL'].count())
    print(col, '= 2')
    print('mean:', df[df[col] == 2]['CLASIFFICATION_FINAL'].count())
    print('--------------------')