From 4d55647761d8436125baa8e3b3d9391c4f8e1b46 Mon Sep 17 00:00:00 2001 From: Jona Date: Wed, 27 Apr 2016 19:20:59 +0200 Subject: [PATCH] Conform with pandas API changes. .sort will be deprecated --- lifelines/fitters/coxph_fitter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lifelines/fitters/coxph_fitter.py b/lifelines/fitters/coxph_fitter.py index 2c23d433a..e26da10fc 100644 --- a/lifelines/fitters/coxph_fitter.py +++ b/lifelines/fitters/coxph_fitter.py @@ -282,7 +282,7 @@ def fit(self, df, duration_col, event_col=None, """ df = df.copy() # Sort on time - df.sort(duration_col, inplace=True) + df.sort_values(by=duration_col, inplace=True) # remove strata coefs self.strata = strata