How to work with multiple links using

I have a Pandas DataFrame with two colomns and about 50 rows, one column has the name of a web page and the other has the href of that web.
I want to pass with a callback this columns to a element to show something like this:

Title Link
Document and Entity Information
Statement of Operations (unaudited)
Statement Comprehensive Income…
Consolidated Balance Sheet
Statement of Consolidated Cash Flows

but I cant figure out how to do it.
Thanks in advance for your help.

Hi @Eduardo

Can you say more about what you want to do with this info once it’s in dcc.Link?
If you just want the columns and links to be displayed so someone can click on the link, you could put it in a datatable.

Hi Ann Mary,
Thanks for your quick answer.
Yes the idea is to display it in a datatable, but I dont understand how to do it with
If I list the columns as datatable columns, I do not have the links.
I tryed to pass the column as a list to the “href” values in the and it receives an error like expected str not list.

Check out this post: Datatable Markdown Link Trouble
It looks like it might work for you.

1 Like

Thanks again Ann Mary,
You are right, this is what I was looking for !!!
but stil have problem to get the link to work properly.
I cant understand why.
It`s funny, in the table it shows each line like:
link= [Document and Entity Information]

but when I copy the row here to show the result, it shows in the way that I really like:

link = Document and Entity Information

Thank you for your help.
dont worry, I will try to solve it analyzing the link you provided in details.

Gracias, Eduardo.

Glad it worked - and thanks to @atarullo for the solution.

You may want to check if you have 'presentation':'markdown' in the column definition with the links.

1 Like

Thanks, I just came back to share that I found that the problem was related with ‘presentation’:‘markdown’.

Muchas gracias. :slightly_smiling_face: :raised_hand_with_fingers_splayed:

1 Like

Hi Ann Mary,

Final question, I am working in my browser using “
now the links works like I wanted, but when I clicked it opens the link with the “” at the begining, like:‘’
The same hapened when I ask to open in a new window with the right button of the mouse.
Is there any way to go directly to the link?

That’s odd - I haven’t seen that before.

Check out this tiny example. It goes directly to the web page when I click on the links:

import dash
import dash_table

app = dash.Dash(__name__)

app.layout = dash_table.DataTable(
    columns=[{"name": "Link", "id": "Link", "presentation":"markdown"}] ,
    data=[{'Link': '[Markdown Guide]('},
          {'Link': '[SEC document]('}]

if __name__ == '__main__':

Your example worked perfect.
I tryed changing ‘like =’ for ‘like’ :
also added { and }, but nothing happens.
Dont warry, You helped me a lot.