UPDATE ***** I solved using awk on Windows. Using this command to successfuly add files side by side.
call awk -F"\t" "NR==FNR{a[NR]=$1; next} {print a[FNR], $0}" OFS="\t" test1.csv test2.csv
I've tried this a few ways but still can't get it to work, I am guessing it is something to do with the special characters in one of the files. Using the paste
tool, it's simple.
paste test1.csv test2.csv. > Test3.csv in Linux.
But I haven't got access to anything Linux-related for this task.
My environment is Windows 7, with Python 2.7 (No Pandas) and Perl Strawberry installed.
I need to merge 2 (or more) csv files together side by side. The files will always have the same number of lines.
I've tried this using python and it didn't work.
Join txt files side by side in python
I've tried this using Batch and it didn't work.
Merge csv file side by side using batch file.
test1.csv contains
python pdf2txt.py -o C:\Users\user\Desktop\Folder\Folder2\
python pdf2txt.py -o C:\Users\user\Desktop\Folder\Folder2\
python pdf2txt.py -o C:\Users\user\Desktop\Folder\Folder2\
test2.csv contains
123456.pdf
123457.pdf
124587.pdf
What I want the output to be (Test3.csv) is a tab delimited file containing;
python pdf2txt.py -o C:\Users\user\Desktop\Folder\Folder2\ 123456.pdf
python pdf2txt.py -o C:\Users\user\Desktop\Folder\Folder2\ 123457.pdf
python pdf2txt.py -o C:\Users\user\Desktop\Folder\Folder2\ 124587.pdf
Any help is greatly appreciated.
thanks you.