$npx skillfedfor your agent

lifelines

Survival analysis in Python, including Kaplan Meier, Nelson Aalen and regression

Worth itPyPI Scientific/EngineeringReleased Mar 20262.5M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — lifelines-0.30.3-py3-none-any.whl
v0.30.3 · released 2026-03-05 · Python >=3.11 · 7 runtime deps: numpy, scipy, pandas, matplotlib, autograd, autograd-gamma, formulaic

Yes. lifelines is actively maintained, has low install friction, carries no known vulnerabilities, and is licensed permissively. It is the standard Python library for survival analysis and well-suited for anyone analyzing time-to-event data with censoring. Install it if you need to fit survival models or estimate event-time distributions.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.11 or later.
  • Low friction: pure Python wheel, active maintenance (last commit 2026-03-07), and modern Python support (3.11+).
  • Seven runtime dependencies are all standard scientific packages (numpy, scipy, pandas, matplotlib, autograd, autograd-gamma, formulaic), widely available and well-maintained.

License · maintenance · safety

MIT (permissive) — MIT license is permissive; you can use, modify, and distribute lifelines with minimal restrictions, making it suitable for both open-source and commercial projects.

last release 2026-03-05 (162 days) · last repo commit 2026-03-07 · 2,604 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,547,917 downloads/mo, #3,006 on PyPI

Verify before relying

pip install lifelines

from lifelines import KaplanMeierFitter
import pandas as pd

kmf = KaplanMeierFitter()
kmf.fit(durations=df['time'], event_observed=df['event'])
kmf.plot_survival_function()
  • Whether the package supports right-censored, left-censored, and interval-censored data types beyond what the description implies.
  • Performance characteristics and scalability limits for large datasets or high-dimensional covariate spaces.
Same gist for agents: .md · .json

What it is and what it does

lifelines is a pure Python library for survival analysis—a statistical discipline originally developed in medicine and actuarial science to answer when and why events occur under uncertainty. It provides implementations of classical estimators (Kaplan-Meier, Nelson-Aalen) and regression models to analyze time-to-event data, where observations may be censored (incomplete). The library depends on numpy, scipy, pandas, matplotlib, autograd, autograd-gamma, and formulaic to handle numerical computation, data manipulation, visualization, and automatic differentiation.

Beyond medical applications, survival analysis applies to subscriber lifetime measurement in SaaS, inventory stock-outs, political party or relationship lifespans, and A/B testing for time-to-action. lifelines abstracts the mathematical complexity, allowing researchers and data scientists to fit models, estimate survival curves, and test hypotheses on censored data without implementing the algorithms from scratch.

Use it for

  • Estimate patient survival curves and test whether treatment groups differ in time-to-event outcomes.
  • Measure SaaS subscriber lifetime and identify factors (pricing, features, cohort) that influence churn.
  • Analyze A/B test results to determine which variant leads to faster user action completion.
  • Study political party or relationship lifespans to understand what factors predict dissolution.
  • Quantify inventory demand by treating stock-outs as censoring events in demand estimation.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

lifelines is actively maintained, has low install friction, carries no known vulnerabilities, and is licensed permissively. It is the standard Python library for survival analysis and well-suited for anyone analyzing time-to-event data with censoring. Install it if you need to fit survival models or estimate event-time distributions.

Install

lifelines on PyPI

Before you install

Low friction: pure Python wheel, active maintenance (last commit 2026-03-07), and modern Python support (3.11+). Seven runtime dependencies are all standard scientific packages (numpy, scipy, pandas, matplotlib, autograd, autograd-gamma, formulaic), widely available and well-maintained.

Requires Python 3.11 or later.

License in practice

MIT license is permissive; you can use, modify, and distribute lifelines with minimal restrictions, making it suitable for both open-source and commercial projects.

Quickstart

pip install lifelines

from lifelines import KaplanMeierFitter
import pandas as pd

kmf = KaplanMeierFitter()
kmf.fit(durations=df['time'], event_observed=df['event'])
kmf.plot_survival_function()

Verify before relying

  • Whether the package supports right-censored, left-censored, and interval-censored data types beyond what the description implies.
  • Performance characteristics and scalability limits for large datasets or high-dimensional covariate spaces.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.11
Install frictionLow. Pure-Python wheel
Runtime dependencies
7 packages
numpyscipypandasmatplotlibautogradautograd-gammaformulaic
MaintenanceActively maintained 162 days since the last release
Last repo commit
First released
Downloads2,547,917 / month, #3,006 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering

Evidence: lifelines-0.30.3-py3-none-any.whl

Tags

Capabilities
survival analysis pythonkaplan meier estimatortime to event analysiscensored data analysisnelson aalen estimatorcox regressionlifetime analysis
Topics
survival-analysistime-to-eventstatistical-modeling

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “kaplan meier estimator”

  • lifelineslifelines implements survival analysis methods—Kaplan-Meier,…
  • tensorflow-estimatorTensorFlow Estimator provides a high-level API for building and…
  • azureml-train-coreProvides estimator classes for training machine learning models in…

Give your agent the search over MCP, or paste the wish link into any chat.

More Scientific/Engineering packages

numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
pandas Worth it
PyPI · Scientific/Engineering · released Jul 2026

pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.

BSD-3-Clausecompiled wheel · 3.11+
769.1Mdownloads / mo
scipy Worth it
PyPI · Libraries · released Jun 2026

scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.

BSD-3-Clausecompiled wheel · 3.12+
449.0Mdownloads / mo
scikit-learn Worth it
PyPI · Software Development · released Jun 2026

scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.

Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.

BSD-3-Clausecompiled wheel · 3.11+
235.5Mdownloads / mo
dill Worth it
PyPI · Software Development · released Jan 2026

dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.

BSD-3-Clausepure Python · 3.9+
208.1Mdownloads / mo
multiprocess Worth it
PyPI · Software Development · released Jan 2026

Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.

Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.

BSD-3-Clausepure Python · 3.9+
202.7Mdownloads / mo

See also Lifetimes · reliability · scikit-survival · statsmodels · pymannkendall · pytensor-distributions · linearmodels · yellowbrick · spreg · conda-pack