I am trying read a CSV file into python 3 using unicodecsv
library. Code follows :
with open('filename.csv', 'rb') as f:
reader = unicodecsv.DictReader(f)
Student_Data = list(reader)
But the order of the columns in the CSV file is not retained when I output any element from the Student_Data
. The output contains any random order of the columns. Is there anything wrong with the code? How do I fix this?