title: Python Pandas read_excel dtype str replace nan by blank ('') when reading or when writing via to_csv
body: <p>Python version: Python 2.7.13 :: Anaconda custom (64-bit)
  Pandas version: pandas 0.20.2</p>
  
  <p>Hello,</p>
  
  <p>I have a quite simple requirement.
  I would like to read an excel file and write a specific sheet to a csv file.
  Blank values in the source Excel file should be treated / written as blank when writing the csv file.
  However, my blank records are always written as 'nan' to the output file. (without the quotes)</p>
  
  <p>I read the Excel file via method</p>
  
  <p><strong>read_excel(xlsx, sheetname='sheet1', dtype = str)</strong></p>
  
  <p>I am specifying dtype because I have some columns that are numbers but should be treated as string. (Otherwise they might lose leading 0s etc)
  i.e. I would like to read the exact value from every cell.</p>
  
  <p>Now I write the output .csv file via
  <strong>to_csv(output_file,index=False,mode='wb',sep=',',encoding='utf-8')</strong></p>
  
  <p>However, my result csv file contains nan for all blank cells from the excel file.</p>
  
  <p>What am I missing? I already tried .fillna('', inplace=True) function but it seems to be doing nothing to my data.
  I also tried to add parameter na_rep ='' to the to_csv method but without success.</p>
  
  <p>Thanks for any help!</p>
  
  <p>Addendum: Please find hereafter a reproducible example.</p>
  
  <p>Please find hereafter a reproducible example code.
  Please first create a new Excel file with 2 columns with the following content:
  COLUMNA COLUMNB COLUMNC
  01      test
  02  test<br>
  03      test</p>
  
  <p>(I saved this Excel file to c:\test.xls
  Please note that 1st and 3rd row for column B as well as the 2nd row for Column C is blank/empty)</p>
  
  <p>Now here is my code:</p>
  
  <pre><code>import pandas as pd
  xlsx = pd.ExcelFile('c:\\test.xlsx')
  df = pd.read_excel(xlsx, sheetname='Sheet1', dtype = str)
  df.fillna('', inplace=True)
  df.to_csv('c:\\test.csv', index=False,mode='wb',sep=',',encoding='utf-8', na_rep ='')
  </code></pre>
  
  <p>My result is:<br>
   COLUMNA,COLUMNB,COLUMNC<br>
   01,nan,test<br>
   02,test,nan<br>
   03,nan,test  </p>
  
  <p>My desired result would be:<br>
  COLUMNA,COLUMNB,COLUMNC<br>
  01,,test<br>
  02,test,<br>
  03,,test  </p>