Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

adding hyperlinks in streamlit table

import streamlit as st
import pandas as pd
from bokeh.plotting import figure

from bokeh.models import ColumnDataSource, CustomJS
from bokeh.models import DataTable, TableColumn, HTMLTemplateFormatter


df = pd.DataFrame({
        "links": ["https://www.google.com", "https://streamlit.io", "https://outlook.com"],
})
cds = ColumnDataSource(df)
columns = [
TableColumn(field="links", title="links", formatter=HTMLTemplateFormatter(template='<a href="<%= value %>"target="_blank"><%= value %>')),
]
p = DataTable(source=cds, columns=columns, css_classes=["my_table"])
st.bokeh_chart(p)
Comment

PREVIOUS NEXT
Code Example
Python :: how to reverse a dictionary in python 
Python :: machine learning cheatsheet activation function 
Python :: pandas : stratification (mean) 
Python :: specificity formula python 
Python :: code=H18 desc="Server Request Interrupted" django 
Python :: semaphore example in python 
Python :: how to delete a row based on a criteria in python datafram 
Python :: python sum 1-50 
Python :: how to create a login page in python 
Python :: background subtraction params opencv python 
Python :: python global variable that can be iterated 
Python :: print a box like the ones below 
Python :: if function has no argument python 
Python :: python import file from same directory 
Python :: python counter infinite series 
Python :: comprehensions 
Python :: intersection of list of sets 
Python :: numpy loadtxt comment 
Python :: break outside loop python 
Python :: get maximum values in a column by a subgroup of a dataframe pandas 
Python :: filter numbers with bounds filter_bounds python 
Python :: Freqtrade - Informative Pairs 
Python :: assert raises with properties python 
Python :: how to create decorator function in django 
Python :: Random Remarks Example in python 
Python :: how to convert ui file to py file 
Python :: how to change directory in python 
Python :: python class variable 
Python :: regular expression in python 
Python :: whatsapp bot python code 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =