I'm consuming a CSV that is generated by an external process. This CSV goes to different places and requires different columns to be included or excluded.
An example of the difference in files...
File 1:
Col1,Col2,Col3,Col4,Col5
ABC,DEF,GHI,JKL,MNO
File 2:
Col4,Col5
JKL,MNO
Pseudo:
1. Open the initial CSV file and create a new CSV file.
2. Loop through the CSV file and for each line copy the columns needed
3. Drop new file in new location
I'm stuck copying the right columns or just removing them. Is there an easy way to loop through each row and just remove data up to a certain comma?