How can I make a df cell hyperlinkable?

Hi,

I have a spreadsheet that I am importing as a dataframe. One column includes string hyperlinks in the form “http:…whatever”. I want to make each cell a hyperlink, so click on the text, go to the address. I

st.markdown("### Books In Print")
df = pd.read_csv("BIP4streamlit.csv")
df['title'].astype(str)
df['Contributor 1'].astype(str)
df

Is there a way to do this?

1 Like

Hi @fredzannarbor!

As far as I’m aware, it’s not possible to add hyperlinks in native Streamlit tables.

My suggestion to get these clickable URLs would be to convert your tables to the Ag-grid format.

Let us know how it goes! :raised_hands:

Best,
Charly

2 Likes

Nice! ag-grid was news to me.

This should be helpful
Display URLs in dataframe column as a clickable hyperlink - Using Streamlit - Streamlit

2 Likes