Heart disease patient survival
You're a data scientist at a clinical research organization that studies heart diseases. You wonder if pericardial effusion, fluid build-up around the heart, affects heart attack patients' survival outcomes. In this exercise, you will explore how to use two statistical methods to compare survival distributions from patients with and without pericardial effusion.
The data is split up into two DataFrames:
has_pericardial_effusion
: patients with pericardial effusionnone_pericardial_effusion
: patients without pericardial effusion
The pandas
package is loaded as pd
and the KaplanMeierFitter
class is imported from lifelines
.
This exercise is part of the course
Survival Analysis in Python
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Print first row
print(____)