title: Writing pandas data frame to csv but no space between columns- sep'\t' argument is ignored in Python 3
body: <p>I have a problem and found many related questions asked here and read them all, but still can`t solve it. So far I didn't get any answer.</p>
  
  <p>I have two files one is .csv and the other is .xlsx. They have a different number of rows and columns.  I would like to merge these two according to filenames. Very simplified the two files look like as follows;</p>
  
  <p>The csv file;</p>
  
  <p><a href="https://i.stack.imgur.com/4LS8a.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4LS8a.png" alt="enter image description here"></a></p>
  
  <p>the excel file;</p>
  
  <p><a href="https://i.stack.imgur.com/7kivX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7kivX.png" alt="enter image description here"></a></p>
  
  <p>First i converted them  to panda data frame;</p>
  
  <pre><code>import pandas as pd
  import csv,xlrd
  
  df1 = pd.read_csv('mycsv.csv')
  df2=pd.read_excel(myexcel.xlsx', sheetname=0)
  </code></pre>
  
  <p>To merge the two files on the same column I remove the white space in column names in df2 using the first line below and, then I merge them and print the merged data frame in csv file.</p>
  
  <pre><code>df2.columns=df2.columns.str.replace(' ', '')
  df=pd.merge(df1, df2, on="filename")
  df.to_csv('myfolder \\merged_file.csv', sep="\t ")
  </code></pre>
  
  <p>When I check my folder, I see merged_file.csv exists but when I opened it there is no space between columns and values. I want to see nice normal csv or excel look, like my example files above. Just to make sure I tried everything, I also converted the Excel file to a csv file and then merged two csv but still merged data is written without spaces. Again, the above files are very simplified, but my real merged data look like this;</p>
  
  <p><a href="https://i.stack.imgur.com/dGKbL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dGKbL.png" alt="enter image description here"></a></p>