In case anyone comes along with a similar question, here’s how I fixed it after some digging:
all markdown links must be formatted as such: string to be clicked
Here’s how I turned my dataframe column into a dash table of clickable links:
def gen_table(dict):
df = pd.DataFrame(dict)
#format dataframe column of urls so that it displays as hyperlink
def display_links(df):
links = df['link'].to_list()
rows = []
for x in links:
link = '[Link](' +str(x) + ')'
rows.append(link)
return rows
df['link'] = display_links(df)
#turn df back into dictionary
dict= df.to_dict('records')
#Create Table
tbl = dash_table.DataTable(
id = 'hashtag_data',
style_data={'whiteSpace': 'normal',
'height':'auto'},
style_table={'overflowX': 'scroll',
'textOverflow':'ellipsis',
'maxHeight': '800px',
'paddingTop': '2px'
},
data=dict,
columns=[{'name': 'Date', 'id':'date'}, {'name': 'Comment', 'id':'msg_cleaned'}, {'name': 'All Hashtags', 'id':'hashtags'}, {'name': 'Link', 'id':'Link','type':'text','presentation':'markdown'}],
filter_action = 'native',
sort_action = 'native',
sort_mode = 'multi',
fixed_rows = {'headers':True}
)
return tbl