Survival, Hazard, Regression, Data Science, Hands On Tutorials.
survival_status_without_prior_surgery = df.loc[~idx, 'SURVIVAL_TIME'], df.loc[~idx, 'SURVIVAL_STATUS'] #Fit a Kaplan-Meier plot to the respective sample, with and without prior surgery kmf_with_prior_surgery = KaplanMeierFitter(label='Group with prior heart