With the latest Streamlit release (1.23
) we added new column types that can be used with st.dataframe
or st.data_editor
. This also includes the LinkColumn
which can just URLs as clickable hyperlinks:
import pandas as pd
import streamlit as st
data_df = pd.DataFrame(
{
"apps": [
"https://roadmap.streamlit.app",
"https://extras.streamlit.app",
"https://issues.streamlit.app",
"https://30days.streamlit.app",
],
}
)
st.data_editor(
data_df,
column_config={
"apps": st.column_config.LinkColumn("Trending apps")
},
hide_index=True,
)
It’s currently not possible to show a label instead of the URL, if you would like to do that as well you can upvote this feature request on Github.