{% macro table(table_data, context) %} {% set groupby = context["groupby"] %} {% set context_key = groupby + 's' %} {% for title, data in table_data.items() %} {% if context[context_key].get(title) %}
Model | {% endif %} {% for metric in data.columns %}{{ metric }} | {% endfor %}
---|---|
{{model}} | {% endif %} {% for _, value in row.items() %}{{ value }} | {% endfor %}