how to combine CSV files using cat .csv when one of the files has an NA value in cell A1
0
votes
0
answers
1170
views
I'm trying to merge a large number of CSV files all of which have identical columns using the terminal command
### csv2 - contains data
###
### my desired output is this
cat *.csv >merged.csv
. Some of the files have an NA
value in the first cell. In these cases, that initial row gets added to the last row of the previous file.
Here is a very simple example.
### csv1 - contains column headers


cat *.csv >merged.csv
yields this output


Asked by John J.
(101 rep)
Jan 27, 2021, 05:10 PM