From the documentation I realize that it is possible to create styles over pandas dataframes. However, I would like to know if it is possible to create a link style. So far this is what I tried:
def linkify(data_frame_col):
list_words = ['<a href="http://this_is_url_{}">{}</a>'.format(a,a) for a in data_frame_col]
return list_words
The problem is that when I visualize the pandas dataframe into a flask website I get the following style:
['<a href="http://this_is_url_hi">hi</a>',
'<a href="http://this_is_url_quick fox brown">quick fox brown</a>',
'<a href="http://this_is_url_fall apart">fall apart</a>',
'<a href="http://this_is_url_hi">hi</a>',
'<a href="http://this_is_url_no">no</a>']
Instead of links. Any idea of how to get hrefs like this stye: this inside the pandas dataframe?.
Update
My template looks like this:
view.html:
<!doctype html>
<title>title</title>
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='style.css') }}">
<div class=page>
<h1>Title</h1>
{% for table in tables %}
<h2>{{titles[loop.index]}}</h2>
{{ table|safe }}
{% endfor %}
</div>