We have a project where we are sent text files of raw data with no header row and we get a separate file which has the column headers in. I need to append the column headers to the top of the raw data so I can use it. I don't want to put a field organiser and manually go through and add the column names The assumption is that the order in the headers file is in the same order as the data.
Has anybody done this before and how did you get over it? I have attached a method I'm looking at but ideally I don't want to have to write out a file and read it back in again (especially as the files are in excess of 2million rows).
If you want to avoid using the cmd prompt, just append the two files together (in image or use batch append just need to make sure the first file is the header - it is treated alphabetically) in Omniscope (with "Has header" unticked) and output the new csv without a header.
Then read in the output csv and set the header accordingly.
Another way but slightly more complicated is to use R script to append files together. Using R script you can append multiple csv files within a directory space and might be more useful if you intend to update the data set over time and just saving all the data files into the same place.