title: Pandas Dataframe in Flask
body: <p>I have a pandas dataframe by using this code:</p>
  
  <pre><code>frame['count'] = 1
  frame['age_group'] = pd.cut(frame.age, [0,10,20,30,40,50,60,70,80,90,100])
  
  age_grp = frame.pivot_table('count', index='age_group', columns='gender', aggfunc='sum').fillna(0).
  </code></pre>
  
  <p>and the dataframe looks like this</p>
  
  <pre><code>     gender       F      M
      age_group       
      (0, 10]     0.0     0.0
      (10, 20]    0.0     0.0
      (20, 30]    2.0     0.0
      (30, 40]    6.0     5.0
      (40, 50]    15.0    4.0
      (50, 60]    35.0    24.0
      (60, 70]    47.0    30.0
      (70, 80]    24.0    6.0
      (80, 90]    1.0     2.0
      (90, 100]   0.0     0.0
  </code></pre>
  
  <p>How can I loop this dataframe properly? im planning to use a double bar chart using chartjs with this data.</p>
  
  <p>*attempting to try this 
  <a href="https://stackoverflow.com/questions/40830975/iterate-over-pandas-dataframe-in-jinja2">iterate over pandas dataframe in jinja2</a></p>
  
  <pre><code>{% for key,value in x.iterrows() %}
        &lt;option value="{{ value['id'] }}"&gt;{{ value['text'] }}&lt;/option&gt;
  {% endfor %}
  </code></pre>
  
  <p>trying to print the boundaries.</p>