dynamic rowspan in jinji
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th>Year</th>
<th>Month</th>
<th>Name</th>
</tr>
</thead>
<tbody>
{% for yr in yrs %}
{% set yr_loop = loop %}
{% for month in months[loop.index0] %}
{% set month_loop = loop %}
{% for name in names[yr_loop.index0][loop.index0] %}
<tr>
{% if loop.first %}
{% if month_loop.first %}
<td rowspan="{{ names[yr_loop.index0]|sum(start=[])|count }}">{{ yr }}</td>
{% endif %}
<td rowspan="{{ loop.length }}">{{ month }}</td>
{% endif %}
<td>{{ name }}</td>
</tr>
{% endfor %}
{% endfor %}
</tbody>
</table>
<div>