Hi
The expected result is 12 rows instead of 6 rows. Also, I want the header only at the beginning, but I don't know how to do that. thank you for reading.

Hi
The expected result is 12 rows instead of 6 rows. Also, I want the header only at the beginning, but I don't know how to do that. thank you for reading.
If it were me, I would read the two CSVs into lists, one line per list item. Create a new list, copy item one into new list (that's the header line). Now copy the next three lines into the new list. Then, on the other list, copy in lines 2, 3, and 4. Finally, write the new list to a new CSV file.
If you wanted to get fancy, you can write an algorithm that will step through both files, checking each line, and writing them in some kind of order (i.e. a sort or merge).