I am really new to python and pandas, I am trying to execute a python script using arguments in the command line but I got an error, here is my script
#!/usr/bin/python
import sys, pandas as pd
df1 = pd.read_table(sys.argv[0], sep="\t", header=0)
df2 = pd.read_table(sys.argv[1], sep="\t", header=0)
df_merge = pd.merge(left=df1, right=df2, left_on=sys.arg[2], right_on=sys.arg[3])
df_merge.to_csv(sys.arg[4], sep="\t")
And I got the following error: KeyError: u'no item named file.out'
, any help would be apreciated
My command line statement is: merge_files.py file1.out file2.out col1 col3 test