def create_link(file_name, file_id): return f'http://localhost:port/{file_name}/{file_id}' def make_clickable(val): # target _blank to open new window return '{}'.format(val, val) data['link'] = data.apply(lambda x: create_link(str(x['file_path']), x['file_id']), axis=1) clickable_table = data.style.format({'link': make_clickable})