Skip to content

Commit bbc3a45

Browse files
committed
Bug fixes: Update display_clinical_html for pandas upgrade. render to to_html. Use iloc for indexing pandas.
1 parent 56aaf17 commit bbc3a45

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

portpy/photon/evaluation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,14 +221,14 @@ def color_plan_value(row):
221221
if 'Limit' in row:
222222
if not row['Limit'] == '':
223223
limit = float(re.findall(r"[-+]?(?:\d*\.*\d+)", row['Limit'])[0])
224-
if row[i] > limit + 0.0001: # added epsilon to avoid minor differences
224+
if row.iloc[i] > limit + 0.0001: # added epsilon to avoid minor differences
225225
row_color[i] = highlight_red # make plan value in red
226226
else:
227227
row_color[i] = highlight_green # make plan value in red
228228
if 'Goal' in row:
229229
if not row['Goal'] == '':
230230
goal = float(re.findall(r"[-+]?(?:\d*\.*\d+)", row['Goal'])[0])
231-
if row[i] > goal + 0.0001:
231+
if row.iloc[i] > goal + 0.0001:
232232
row_color[i] = highlight_orange # make plan value in red
233233
else:
234234
row_color[i] = highlight_green # make plan value in red
@@ -244,7 +244,7 @@ def color_plan_value(row):
244244
if return_df:
245245
return styled_df
246246
if in_browser:
247-
html = styled_df.render() # render to html
247+
html = styled_df.to_html() # render to html
248248
html_string = '''
249249
<html>
250250
<head><title>Portpy Clinical Criteria Evaluation</title></head>

0 commit comments

Comments
 (0)