It's old question. However, I could not find satisfactory answer. Decided to post this question. I have a .csv
file with column heading. How can I import this .csv
file into Mathematica assigning column names as list names in short and sweet way. For example, I can use the following codes.
mydata = Import[file, Path -> path];
names = Flatten[mydata[[;; 1]]];
Do[listnames[names[[i]]] =
mydata[[2 ;;]][[All, i]], {i, 1, Dimensions[mydata[[2 ;;]]][[2]]}];
But I need to write listnames["Col names in .csv file"] to refer to each list. I can not refer .csv
column names as list names. I need to figure out this because I have over 1000 column headings in my .csv
data. Please help me to figure out his without long codes.