I have a CSV file the first row of which contains the variables names and the rest of the rows contains the data. What's a good way to break it up into files each containing just one variable in Python? Is this solution going to be robust? E.g. what if the input file is 100G in size? I am trying to perform a divide conquer strategy but is new to Python. Thanks in advance for your help!
The input files looks like
var1,var2,var3
1,2,hello
2,5,yay
...
I want to create 3 (or however many variables) files var1.csv, var2.csv, var3.csv so that files resemble File1
var1
1
2
...
File2
var2
2
5
...
File3
var3
hello
yay