Skip to content

Commit

Permalink
w.e
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed Jun 14, 2018
1 parent 67259c9 commit 1058c8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lifelines/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ def qth_survival_times(q, survival_functions, cdf=False):
# Typically, one would expect that the output should equal the "height" of q.
# An issue can arise if the Series q contains duplicate values. We handle this un-eligantly.
if q.duplicated().any():
return pd.DataFrame.from_dict([
{_q: survival_functions.apply(lambda s: qth_survival_time(_q, s))) for i, _q in enumerate(q)}
return pd.DataFrame.from_items([
(_q, survival_functions.apply(lambda s: qth_survival_time(_q, s))) for i, _q in enumerate(q)
], orient='index', columns=survival_functions.columns)
else:
return pd.DataFrame({_q: survival_functions.apply(lambda s: qth_survival_time(_q, s)) for _q in q}).T
Expand Down

0 comments on commit 1058c8f

Please sign in to comment.