title: Iterate over pandas dataframe in jinja2
body: <p>I have this dataframe:</p>
  
  <pre><code>        id       text
   0      12       boats
   1      14       bicycle
   2      15       car
  </code></pre>
  
  <p>Now I want to make a select dropdown in jinja2. But I cannot find a way to loop over the dataframe in jinja2.</p>
  
  <p>I tried using to_dict(). But with</p>
  
  <pre><code>{% for key,value in x.items() %}
  </code></pre>
  
  <p>it loops over id and text instead of the rows. How can I change this so I can do something like this in the template?</p>
  
  <pre><code>{% for key,value in x.items() %}
      &lt;option value="{{ id }}"&gt;{{ text }}&lt;/option&gt;
  {% endfor %}
  </code></pre>