I have a numpy chararray populated with items and I need for each item to be a clickable link in the html. But the href tag is displaying as text when I do this:
grid = np.chararray(shape=[2,2]).astype('|S55')
item = "<a href='#'>%s</a>" % str(item_number)
grid[1,1] = item
I don't know that it matters, but I'm using pandas to create a dataframe and then sending it to the django template as html using the to_html() method.
df = pd.DataFrame(
data=grid.astype(str), # values
index=side, # 1st column as index
columns=header # 1st row as the column names
)
table = df.to_html()
How can I put a link inside a chararray such that it's clickable when rendered on the page?