0

Sorry am quite new to this but I tried running some code and I get exit code 0 (no errors) but I do not see any output (in the Python console) Am using PyCharm Python 3.7 with lifelines package

from lifelines import KaplanMeierFitter

durations = [5,6,6,2.5,4,4]
event_observed = [1, 0, 0, 1, 1, 1]

## create a kmf object
kmf = KaplanMeierFitter()

## Fit the data into the model
kmf.fit(durations, event_observed,label='Kaplan Meier Estimate')

## Create an estimate
kmf.plot(ci_show=False) 
Cam.Davidson.Pilon
  • 1,606
  • 1
  • 17
  • 31

1 Answers1

0

Managed to figure it out! Needed plt.show()

AlSub
  • 1,384
  • 1
  • 14
  • 33