django html显示pd.DataFrame

               <table class="table table-striped">
                        <tr class="warning">
                        <td>序号</td>
                        {% for column in show_columns %}
                            <td>{{column}}</td>
                        {% endfor %}
                        </tr>
                        {% for index,row_value in     only_station_info_groupby_site.iterrows %}
                            {% if  forloop.counter|divisibleby:2 %}
                                <tr class="info">
                            {% endif %}
                                    <td>{{forloop.counter}}.</td>
                                    {% for value in row_value %}
                                        <td>{{value}}</td>
                                    {% endfor %}
                                </tr>
                        {% endfor %}
                    </table>    

  

上一篇:js break continue


下一篇:Django 标签