I am trying to add the below 2 data frames like below,writing the result to external file and by default the separator as comma(,) but I need the separator as space, any idea how to achieve this?
df16 = pd.DataFrame(" <SOURCE BUSINESSNAME ="'""'" DATATYPE ="'"'""+df2+""'"'">")
df18 = pd.DataFrame("NAME ="'"'""+df17+""'"'" />")
result = pd.concat ([df16]+[df18], axis=1)
result.to_csv('C:\\SAM\\TEST.dat',quoting=csv.QUOTE_NONE,header=0,index=False,mode='a+')
Actual Output:
<SOURCE BUSINESSNAME ="" DATATYPE ="CHAR"/>,NAME ="BA_RECCODE"
Expected Output:
<SOURCE BUSINESSNAME ="" DATATYPE ="CHAR"/> NAME ="BA_RECCODE"