skip to navigation
skip to content

Not Logged In

lifelines 0.2.1

Survival analysis in Python

Latest Version:


[![Build Status](](

[What is survival analysis and why should I learn it?]( Survival analysis was originally developed and applied heavily by the actuarial and medical community. Its purpose was to answer *why do events occur now versus later* under uncertainity (where *events* might refer to deaths, disease remission, etc.). This is great for researchers who are interested in measuring lifetimes: they can answer questions like *what factors might influence deaths?*

But outside of medicine and actuarial science, there are many other interesting and exicting applications of this
lesser-known technique, for example:
- SaaS providers are interested in measuring customer lifetimes;
- ecommerce shops are interested the time between first and second order (called *repeat purchase rate*).
- sociologists are interested in measure political parties lifetimes, or relationships, or marriages
- and many others

*lifelines* is a pure Python implementation of the best parts of survival analysis. We'd love to hear if you use *lifelines*, please ping me at [@cmrn_dp]( and let me know your
thoughts on the library.



The usual Python data stack: numpy, scipy, pandas (a modern version please), matplotlib (optional).

#### Installation:

You can install *lifelines* using

       pip install lifelines

Or getting the bleeding edge version with:

       pip install git+

from the command line.

## (Quick) Intro to *lifelines* and survival analysis

If you are new to survival analysis, wondering why it is useful, or are interested in *lifelines* examples and use,
I recommend running the `Tutorial and Examples.ipynb` notebook in a IPython notebook session. Alternatively, you can [view it online here](

## Documentation

*Work in progress (80%)*

I've added documentation to a notebook, `Documentation.ipynb`, that adds detail to
the classes, methods and data types. You can use the IPython notebook to view it, or [view it online](

#### More examples

There are some IPython notebook files in the repo, and you can view them online here.

- [Divorce data](
- [Gehan's survival dataset](
File Type Py Version Uploaded on Size
lifelines-0.2.1.tar.gz (md5) Source 2013-12-19 1MB
  • Downloads (All Versions):
  • 1109 downloads in the last day
  • 2135 downloads in the last week
  • 10208 downloads in the last month