I try to use pythons lifelines package Package website and Github. After trying to run the example from the website which reads:
from lifelines.datasets import load_waltons
from lifelines import KaplanMeierFitter
df = load_waltons()
T = df['T']
E = df['E']
kmf = KaplanMeierFitter()
kmf.fit(T, event_observed=E)
kmf.plot()
Resulting in the following error
Traceback (most recent call last):
File "/Kaplan_Meier/Kaplan_Meier.py", line 11, in <module>
kmf.plot()
File "/lib/python3.5/site-packages/lifelines/plotting.py", line 331, in plot
set_kwargs_color(kwargs)
File "/lib/python3.5/site-packages/lifelines/plotting.py", line 223, in set_kwargs_color
kwargs["ax"]._get_lines.get_next_color())
AttributeError: '_process_plot_var_args' object has no attribute 'get_next_color'
I feel like I am missing out on something, but cant really work out, what is going wrong. Any help is appreciated.
The plotting function is wrapped around Pandas and I use python 3.5.4. EDIT: Pandas is version 0.21.0 which should work as 0.18 or above is required according to https://pypi.python.org/pypi/lifelines/0.12.0