title: For loop through a numpy array of strings
body: <p>I imported a csv file containing zip codes as a string using the following line:</p>
  
  <pre><code>my_data = genfromtext('path\to\file.csv', delimiter = ',', dtype=str, autostrip=True)
  </code></pre>
  
  <p>I am importing as a string in order to keep the leading zeroes some zip codes may contain. Now I need to also loop through the entire numpy array and I wanted to do so like this:</p>
  
  <pre><code>for i in np.nditer(my_data): 
       do something with my_data[i]
  </code></pre>
  
  <p>But unfortunately it is returning the following error:</p>
  
  <blockquote>
    <p>Arrays used as indices must be of integer (or boolean) type</p>
  </blockquote>
  
  <p>Any idea how I can loop through each element of this numpy array?</p>