【发布时间】:2018-10-05 19:47:00
【问题描述】:
请看以下代码:
{% for row in df_src.iterrows %}
<tr >
<td><input type="checkbox"></td>
{% for col in columns %}
<td class="redrow">{{row.1.col}}</td>
{% endfor %}
</tr>
{% endfor %}
在{{row.1.col}} 中,col 可以是任何值,例如 NAME、PHONE 等。当我像 {{row.1.PHONE}} 一样访问它时,我会在 html 中获得值,但是当我像 @987654327 一样访问它时@html 中不显示任何内容。
【问题讨论】:
-
第二个 for 循环似乎是错误的。行的结构是什么?