title: CSV Columns to Arrays in Python
body: <p>I'm having a hard time dealing with what seems to me to be a simple problem. I'm trying to import a csv and split its columns into arrays that I can run different operations on, then zip() back together.</p>
  
  <pre><code>import csv
  
  data = csv.reader(open('test.csv', 'rb'), delimiter=",", quotechar='|')
  column1, column2 = [], []
  
  for row in data:
      column1.extend(row[0])
      column2.extend(row[1])
  
  print column1
  print column2
  </code></pre>
  
  <p>This code prints two arrays with elements that are individual chars rather than strings. When I try to do this with a single column, column1.extend(row) does what I want.</p>
  
  <p>I'm interested in ways to solve this particular problem or to generalize this to n number of columns.</p>