0

i have done a lot of research but i was unable to find an answer.

I have several similar CSV files without headers. I Would like to merge them but in the fastest possible way, if possible without opening the files and reading them.

I m looking for that, but in Python 2.7, the equivalen of the cmd(MS DOS) copy command:

copy *.csv output.csv

The best solution of mny problem would be some kind of command like

copy path/file1.csv .. path/file2.csv output.csv

output.csv would be the result of merging.

all csv are similar.

Thanks in advance!

  • How can you create a file without writing it? If you must write it, then how do you know what to write without reading it? – Cuadue Jun 02 '15 at 00:11

1 Answers1

0

The best way may just be to call the command line rather than use python's file operation functions. Check this answer for info on how to do it:

Community
  • 1
  • 1
Eric
  • 236
  • 3
  • 7