You can read the first line in the file with csvfile.readline() before feeding it to the csv-reader. This advances the file-descriptor to the second line (you can check the position with csvfile.tell()) and thus should omit the header in your output.
csvfile.readline()
reader = csv.DictReader(csvfile, fieldnames)
Update:
As mentioned in my comment, your input data has a problem: There is no distinct separator character, which marks the boundaries between the columns (at least in the data you posted - there are only spaces). If you use commas as separator, everything goes smoothly:
Data:
Matric,Name,Department,Status
2010CS01,Jones Doe,Computer Science,Paid
2010CS02,James Rug,Computer Science,Paid
2010AC01,Curtis Payne,Accounting,Unpaid
Code:
import csv, json
csvfile = open('testdata.csv', 'rU')
jsonfile = open('testdata.json', 'w')
reader = csv.DictReader(csvfile)
for row in reader:
json.dump({ row['Matric'] : (row['Name'], row['Department'], row['Status']) }, jsonfile)
jsonfile.write('\n')
Output:
{"2010CS01": ["Jones Doe", "Computer Science", "Paid"]}
{"2010CS02": ["James Rug", "Computer Science", "Paid"]}
{"2010AC01": ["Curtis Payne", "Accounting", "Unpaid"]}
Like the other comments stated, your expected output is not valid JSon. This output is.
Convert the input data
Suppose your input data is actually separated by tabs, which have been converted to spaces when you posted them here, you can simply specify tabs as separator when parsing the csv:
reader = csv.DictReader(csvfile, delimiter='\t')
If your input data really has only spaces, you can convert multiple spaces to commas with a simple sed:
sed -e 's/\ \{2,\}/,/g' -i testdata.csv
No guarantee this will work - It will fuck things up if you have multiple spaces anywhere in your data fields.