{# TABLE RENDERES #} {# ------------------------------------------------------------------------- #} {% macro render_stats_table(table_title, dict_obj, align="right") -%} {% if table_title -%}

{{ table_title }}

{%- endif %} {% if dict_obj -%} {% for key, value in dict_obj.items() -%} {%- endfor %}
{{ key }}{{ value|autoformat }}
{%- endif %} {%- endmacro %} {% macro render_dataframe(df_title, df, classes="", show_index=True, show_columns=True) -%} {% if df_title -%}

{{ df_title }}

{%- endif %} {% if show_columns -%} {% if show_index -%} {%- endif %} {% for col in df.columns -%} {%- endfor %} {%- endif %} {% for index, row in df.iterrows() -%} {% if show_index -%} {%- endif %} {% for value in row -%} {%- endfor %} {%- endfor %}
{{ df.index.name or ""|autoformat }}{{ col|autoformat }}
{{ index|autoformat }} {{ value|autoformat }}
{%- endmacro %} {# NAV HELPERS #} {# ------------------------------------------------------------------------- #} {% macro make_nav(nav_id, links, classes="nav-tabs") -%} {%- endmacro %} {# OTHERS #} {# ------------------------------------------------------------------------- #} {% macro render_figure(plot, fmt="png") -%} {% if plot %}
{% if fmt == "png" %} {% else %} {{ plot.to_svg() }} {% endif %}
{% endif %} {%- endmacro %}