{% for col in columns %} {% endfor %} {% for col in columns %} {% endfor %} {% for index, row in data %} {% for col in columns %} {% endfor %} {% endfor %}
{{ col.replace('_', ' ').title() }}
{% if col == 'Date' %}Total{% else %}{{ "{:,}".format(data|sum(attribute='1.' + col)) }}{% endif %}
{% if col == 'Date' %}{{ row[col] }}{% else %}{{ "{:,}".format(row[col]) }}{% endif %}