NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI, #3144 most downloaded on PyPI
Survival analysis in Python, including Kaplan Meier, Nelson Aalen and regression
Latest stable
0.30.3
Last release 8 months ago
05 Mar 2026
Release timing varies
gaps range from 2 weeks to 1.3 years
Nearly every release is documented
notes for 60 of the last 60 stable releases
2 versions withdrawn
withdrawn after publishing
13 years old
175 releases · first in 2013
Drag across the ruler to compare, or tap a release to open it.
fix in internal normalization for CoxPHFitter predict methods.
CoxPHFitter predict methods.CoxPHFitter when normalize=True.normalize kwarg in CoxPHFitter. This was causing lots of confusion for users, and added code complexity. It's really nice to be able to remove it.CoxPHFitter.baseline_survival_CoxPHFitter.baseline_cumulative_hazard_ is always centered, to mimic R's basehaz API.predict_log_partial_hazards to CoxPHFittercorrected bug that was returning the wrong baseline survival and hazard values in CoxPHFitter when normalize=True.
Your coding agent can read these notes before it upgrades. Set up the MCP server →
CoxPHFitter when normalize=True.normalize kwarg in CoxPHFitter. This was causing lots of confusion for users, and added code complexity. It's really nice to be able to remove it.CoxPHFitter.baseline_survival_CoxPHFitter.baseline_cumulative_hazard_ is always centered, to mimic R's basehaz API.predict_log_partial_hazards to CoxPHFitteradding plot_loglogs to KaplanMeierFitter
plot_loglogs to KaplanMeierFitterflat argument in plot methods. It was causing confusion. To replicate it, one can set ci_force_lines=True and show_censors=True.strata keyword argument to CoxPHFitter on initialization (ex: CoxPHFitter(strata=['v1', 'v2']). Why? Fitters initialized with strata can now be passed into k_fold_cross_validation, plus it makes unit testing strata fitters easier.strata in CoxPHFitter, access to strata specific baseline hazards and survival functions are available (previously it was a blended valie). Prediction also uses the specific baseline hazards/survivals.CoxPHFitter - should see at least a 10% speed improvement in fit.Nothing published for this version
Nothing published for this version
deprecates Pandas versions before 0.18.
deprecates Pandas versions before 0.18.
throw an error if no admissible pairs in the c-index calculation. Previously a NaN was returned.
add two summary functions to Weibull and Exponential fitter, solves #224
add two summary functions to Weibull and Exponential fitter, solves #224
new prediction function in CoxPHFitter, predict_log_hazard_relative_to_mean, that mimics what R's predict.coxph does.
CoxPHFitter, predict_log_hazard_relative_to_mean, that mimics what R's predict.coxph does.predict method in CoxPHFitter and AalenAdditiveFitter. This is because the choice of predict_median as a default was causing too much confusion, and no other natual choice as a default was available. All other predict_ methods remain.k_fold_cross_validation is now predict_expectationintroduction of a param nn_cumulative_hazards in AalenAdditiveModel's __init__ (default True). This parameter will truncate all non-negative cumulativ
nn_cumulative_hazards in AalenAdditiveModel's __init__ (default True). This parameter will truncate all non-negative cumulative hazards in prediction methods to 0._newton_rhaphson would break too early causing a variable not to be set properly.Nothing published for this version
Nothing published for this version
reorganized lifelines directories:
utils.py into it's down directory.fitters directory.at_risk column to the output of group_survival_table_from_events and survival_table_from_eventslifeline.statistics. sample_size_necessary_under_cph and lifelines.statistics. power_under_cph.addition of a l2 penalizer to CoxPHFitter.
penalizer to CoxPHFitter.strata keyword argument to CoxPHFitter to allow for stratification of a single or set of
categorical variables in your dataset.datetimes_to_durations now accepts a list as na_values, so multiple values can be checked.datetimes_to_durations where fill_date was not properly being applied.datetimes_to_durations to be correct.allow for multiple fitters to be passed into k_fold_cross_validation.
k_fold_cross_validation.lifelines.statstics. now return a StatisticalResult object with properties like p_value, test_results, and summary.WeibullFitter, ExponentialFitter, KaplanMeierFitter and BreslowFlemingHarringtonFitter all have a conditional_time_to_event_ property that measures the median duration remaining until the death event, given survival up until time t.addition of median_ property to WeibullFitter and ExponentialFitter.
median_ property to WeibullFitter and ExponentialFitter.WeibullFitter and ExponentialFitter will use integer timelines instead of float provided by linspace. This is
so if your work is to sum up the survival function (for expected values or something similar), it's more difficult to
make a mistake.Inclusion of the univariate fitters WeibullFitter and ExponentialFitter.
WeibullFitter and ExponentialFitter.BayesianFitter from lifelines.smoothing_penalizer.penalizer keyword arg to coef_penalizer in AalenAdditiveFitter.ridge_regression function in utils.py to perform linear regression with l2 penalizer terms..predict(time) method on univariate fitters can now accept a scalar (and returns a scalar) and an iterable (and returns a numpy array)KaplanMeierFitter, epsilon has been renamed to precision.New API for CoxPHFitter and AalenAdditiveFitter: the default arguments for event_col and duration_col. duration_col is now mandatory, and event_col no
CoxPHFitter and AalenAdditiveFitter: the default arguments for event_col and duration_col. duration_col is now mandatory, and event_col now accepts a column, or by default, None, which assumes all events are observed (non-censored).survival_table_from_events: min_observations is replaced by birth_times (default None).CoxPHFitter for summary: summary will return a dataframe with statistics, print_summary() will print the dataframe (plus some other statistics) in a pretty manner.plot methods, .plot(at_risk_counts=True).CoxPHFitter and AalenAdditiveFitter: the default arguments for event_col and duration_col. duration_col is now mandatory, and event_col now accepts a column, or by default, None, which assumes all events are observed (non-censored).survival_table_from_events: min_observations is replaced by birth_times (default None).CoxPHFitter for summary: summary will return a dataframe with statistics, print_summary() will print the dataframe (plus some other statistics) in a pretty manner.plot methods, .plot(at_risk_counts=True), and the function lifelines.plotting.add_at_risk_counts.refactor tests into smaller files
test_pairwise_logrank_test_with_identical_data_returns_inconclusive a better testk_fold_cross_validation.Lots of improvements to numerical stability (but something things still need work)
summary in CoxPHFitter.Nothing published for this version
refactoring of qth_survival_times: it can now accept an iterable (or a scalar still) of probabilities in the q argument, and will return a DataFrame w
qth_survival_times: it can now accept an iterable (or a scalar still) of probabilities in the q argument, and will return a DataFrame with these as columns. If len(q)==1 and a single survival function is given, will return a scalar, not a DataFrame. Also some good speed improvements._label property that is passed in during the fit.alpha value is overwritten if a new alpha value is passed
in during the fit.conditional_time_to. This returns a DataFrame of the estimate:
med(S(t | T>s)) - s, human readable: the estimated time left of living, given an individual is aged s.include_likelihood to CoxPHFitter fit method to save the final log-likelihood value.Massive speed improvements to CoxPHFitter.
predict_percentile is available on CoxPHFitter and AalenAdditiveFitter. Given a percentile, p, this function returns the value t such that S(t | x) = p. It is a generalization of predict_median.k_fold_cross_validation that will accept different prediction methods (default is predict_median).predict_expectation function.datasets now contains functions for generating the respective datasets, ex: generate_waltons_dataset.Ability to specify default printing in statistical tests with the suppress_print keyword argument (default False).
suppress_print keyword argument (default False).regression_dataset in datasets.CoxFitter implements Cox Proportional Hazards model in lifelines.
CoxFitter implements Cox Proportional Hazards model in lifelines.statistics module now prints the summary (and still return the regular values)BaseFitter class is inherited from all fitters.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.