"Type","Name","Description","Designation","First-term assessment","Second-term assessment","Total"
           "Subject","Nick","D1234","F4321",10,19,29
           "Unit","HTML","D1234-1","F4321",18,,
           "Topic","Tags","First Term","F4321",18,,
           "Subtopic","Review of representation of HTML",,,,,
All the above are the value from an excel sheet , which is converted to csv and that is the one shown above
The header as you notice contains seven coulmns,the data below them vary,
I have this script to generate these from python script,the script is below
 from django.db import transaction
 import sys
 import csv
 import StringIO
 file = sys.argv[1]
 no_cols_flag=0
 flag=0
 header_arr=[]
 print file
 f = open(file, 'r')
while (f.readline() != ""):
  for i in [line.split(',') for line in open(file)]: # split on the separator
    print "==========================================================="
    row_flag=0
    row_d=""
    for j in i: # for each token in the split string
      row_flag=1
      print j
      if j:
        no_cols_flag=no_cols_flag+1
        data=j.strip()
        print j
    break
How to modify the above script to say that this data belongs to a particular column header..
thanks..
 
     
    