title: Extract column data from a CSV file using Python
body: <p>Task: Use python to parse a CSV file and output the contents of a column into a text file.</p>
  <h2>Input file (in.csv):</h2>
  <pre><code>one,two,three  
  four,five,six  
  </code></pre>
  <h2>Python script:</h2>
  <pre><code>#!/usr/bin/env python
  
  import csv
  
  inputFile = open('in.csv', 'r')
  inputReader = csv.reader(inputFile)
  
  outputFile = open('out.txt', 'w')
  outputWriter = csv.writer(outputFile)
  
  for row in inputReader:
          text = row[2]
          # write column 3 to file
          outputWriter.writerow(text)
  
  outputFile.close()
  inputFile.close()
  </code></pre>
  <h2>Expected output</h2>
  <p>three<br />
  six</p>
  <h2>Actual output</h2>
  <p>t,h,r,e,e<br />
  s,i,x</p>