From 1deb06c1cc188b34e4efffe07f891cfeb493dd91 Mon Sep 17 00:00:00 2001 From: CamDavidsonPilon Date: Sat, 30 Dec 2023 15:59:57 -0500 Subject: [PATCH] fix #1587 --- lifelines/utils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lifelines/utils/__init__.py b/lifelines/utils/__init__.py index 96b9cb6f1..653c14131 100644 --- a/lifelines/utils/__init__.py +++ b/lifelines/utils/__init__.py @@ -561,7 +561,7 @@ def _group_event_table_by_intervals(event_table, intervals) -> pd.DataFrame: ) # convert columns from multiindex event_table.columns = event_table.columns.droplevel(1) - return event_table.bfill() + return event_table.bfill().fillna(0) def survival_events_from_table(survival_table, observed_deaths_col="observed", censored_col="censored"):