From aa019dfd91e58dee7ddb63be776dc3b04afa4b2d Mon Sep 17 00:00:00 2001 From: zylatis Date: Tue, 5 Nov 2019 13:46:00 +1100 Subject: [PATCH] Change slow .iloc to .iat in dash-html-table-hyperlinks --- dash-html-table-hyperlinks.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dash-html-table-hyperlinks.py b/dash-html-table-hyperlinks.py index e10e435..4e9ece2 100644 --- a/dash-html-table-hyperlinks.py +++ b/dash-html-table-hyperlinks.py @@ -9,10 +9,12 @@ def Table(dataframe): rows = [] + cols = dataframe.columns for i in range(len(dataframe)): row = [] - for col in dataframe.columns: - value = dataframe.iloc[i][col] + for j in range(len(cols)): + col = cols[j] + value = dataframe.iat[i,j] # update this depending on which # columns you want to show links for # and what you want those links to be