How to show a pandas dataframe into a existing flask html table?

前端 未结 4 2030
暗喜
暗喜 2020-12-04 07:58

This may sound a noob question, but I\'m stuck with it as Python is not one of my best languages.

I have a html page with a table inside it, and I would like to show

4条回答
  •  鱼传尺愫
    2020-12-04 08:35

    For me using Jinja's for loop

    {% for table in tables %}
                {{titles[loop.index]}}
                {{ table|safe }}
    {% endfor %}
    

    didnt work as it simply printed each character 1 by 1. I simply had to use

    {{ table|safe }}
    

提交回复
热议问题