title: How to store the output from series.iteritems()?
body: <p>Input:</p>
  
  <pre><code>Occ2 = df_demog_ds['GenderSelect'].value_counts()
  for index, val in Occ2.iteritems():
    print(index, val, "-", (val*100/1263),"%")
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Male 1089 - 86.22327790973871 %
  Female 168 - 13.30166270783848 %
  A different identity 6 - 0.4750593824228028 %
  </code></pre>
  
  <p>Occ2 is a pd.series. df_demog_ds is a dataframe <a href="https://www7.zippyshare.com/v/IhcLQsKZ/file.html" rel="nofollow noreferrer">LINK</a>. I am trying to directly store the output in a list or a tuple but it's not working out. I tried making empty lists and storing there but that didn't help.</p>
  
  <pre><code>testx = ['0', '0', '0']
  testy = ['0', '0', '0']
  Occ2 = df_demog_ds['GenderSelect'].value_counts()
  for index, val in Occ2.iteritems():
    testx = index
    testy = val
  print(testx)
  print(testy)
  </code></pre>
  
  <p>I also tried to store Occ2.iteritems() but that didn't work too</p>
  
  <p>I feel the problem is very easy to solve but I can't do it with my limited knowledge. I'm a noob in python</p>