如何根据烧瓶中的月份名称排列数据

时间:2018-12-31 21:17:59

标签: python flask html-table

I have a Flask code like this:

    <table class="table">
            <thead>
                <th>YEAR</th>
                <th>Jan</th>
                <th>Feb</th>
                <th>Mar</th>
                <th>Apr</th>
                <th>May</th>
                <th>Jun</th>
                <th>Jul</th>
                <th>Aug</th>
                <th>Sep</th>
                <th>Oct</th>
                <th>Nov</th>
                <th>Dec</th>                
            </thead>
            <tbody><tr>
                    {% for avg, count, date  in data %}                    

                    <td>{{ avg }} [{{ count }}] [{{ date }}]</td>                

                {% endfor %}
            </tr>
            </tbody>

        </table>

它正在生成这样的表。

enter image description here

如何根据月份名称生成表格(忽略年份列)。 就像一月列下的一月数据,二月列下的二月数据等等...

0 个答案:

没有答案