title: zip argument #1 must support iteration error when looping through zip
body: <p>I have seen few other similiar issues reported however I wasn't able to replicate that solution in my case. </p>
  
  <p>My problem is bit more simpler as I have one list of numbers and one list of strings </p>
  
  <pre><code>number = [21, 44, 31, 553, 63, 35]
  access = ["denied", "Try Again", "Retry", "Accepted", "Error", "Success"]
  </code></pre>
  
  <p>I have zipped them and created a pair with each value that looks like this </p>
  
  <pre><code>testInput = zip(number, access)
  
  output: 
  [(21, 'denied'), (44, 'Try Again'), (31, 'Retry'), (553, 'Accepted'), (63, 'Error'), (35, 'Success')]
  </code></pre>
  
  <p>I am trying to loop through each pair and execute my function that maps them to a team name based on the value of the pairs. Here was my attempt:</p>
  
  <pre><code>def mapping(number, access):
      team = ''
      checkNumberAndAccess = zip(number, access)
      for number, access in checkNumberAndAccess:
          if number in range(20,30):
              team = 'Revolt'
          elif (number in range(40,50)) and (access == 'Try Again'):
              team = 'Strike'
          elif (number in range(60,100)) and (access == 'Error'):
              team = 'Exception'
      print team
      return team
  </code></pre>
  
  <p>I want 'Team' variable to hold the value of the mapping output for each pair so this is where I am executing the function:</p>
  
  <pre><code>for number, access in testInput:
      Team = mapping(number, access)
      df = df.append({'Access Message': access, 'Number': number}, ignore_index=True)
  print df
  </code></pre>
  
  <p>I get "TypeError: zip argument #1 must support iteration" error when executing the mapping function. Is it in the wrong place? </p>
  
  <p>full code: </p>
  
  <pre><code>import pandas as pd
  
  df = pd.DataFrame()
  
  
  number = [21, 44, 31, 553, 63, 35]
  access = ["denied", "Try Again", "Retry", "Accepted", "Error", "Success"]
  
  
  def mapping(number, access):
      team = ''
      checkNumberAndAccess = zip(number, access)
      for number, access in checkNumberAndAccess:
          if number in range(20,30):
              team = 'Revolt'
          elif (number in range(40,50)) and (access == 'Try Again'):
              team = 'Strike'
          elif (number in range(60,100)) and (access == 'Error'):
              team = 'Exception'
      print team
      return team
  
  
  testInput = zip(number, access)
  print testInput
  
  for number, access in testInput:
      Team = mapping(number, access)
      df = df.append({'Access Message': access, 'Number': number}, ignore_index=True)
  print df
  </code></pre>