title: write in a csv file in python and read it using the column name
body: <p>while i have written this code</p>
  <pre><code>import csv
      with open('persons.csv', 'w') as csvfile:
          filewriter = csv.writer(csvfile, delimiter=',',quotechar='|')
          filewriter.writerow(['Name', 'Profession'])
          filewriter.writerow(['Derek', 'Software Developer'])
          filewriter.writerow(['Steve', 'Software Developer'])
          filewriter.writerow(['Paul', 'Manager'])
  </code></pre>
  <p>and i am getting the result as</p>
  <pre><code>['Name', 'Profession']
  []
  ['Derek', 'Software Developer']
  []
  ['Steve', 'Software Developer']
  []
  ['Paul', 'Manager']
  []
  </code></pre>
  <p>it is leaving a line in between.
  how to resolve it ???</p>
  <p>And one more thing i want to read  the data from csv using their column name i.e.</p>
  <pre><code>import csv
  with open('persons.csv') as f:
      reader = csv.reader(f)
   
    
      for Name, Profession in reader:
          print(Name, Profession)
  </code></pre>
  <p>--when i run this code it shows error..</p>
  <pre><code> for Name, Profession in reader:
  ValueError: not enough values to unpack (expected 2, got 0)
  </code></pre>
  <p>please suggest how it can work</p>