title: Pandas replace nan depending on type
body: <p>In DataFrane.to_csv, I managed to write csv files removing <code>nan</code> values with</p>
  
  <pre><code>df = df.replace('None','')
  df = df.replace('nan','')
  </code></pre>
  
  <p>but my issue is that with this approach is that every nan values will be replaced with qoutes: <code>''</code></p>
  
  <p>is it possible to replace nan values depending on type? </p>
  
  <pre><code>if the nan dataframe == int dont add qoutes
  if str set to ''
  if float set to 0.0
  </code></pre>
  
  <p>etc.</p>
  
  <p>tried this code but failed </p>
  
  <pre><code>df['myStringColumn'].replace('None', '')
  </code></pre>
  
  <p>edit: here is the sample data frame i have</p>
  
  <pre><code>      aTest    Vendor     name     price    qty
   0    y        NewVend             21.20    nan
   1    y        OldMakes            11.20    3
   2    nan      nan        sample   9.20     1
   3    n        nan        make     nan      0
  </code></pre>
  
  <p>here is my goal</p>
  
  <pre><code>'y','NewVend','',21.20,,     
  'y','OldMakes','',11.20,3,
  '','','sample',9.20,1,
  'n','','make',0.0,0,
  </code></pre>
  
  <p>here is the full script</p>
  
  <pre><code>dtype_dic= {'price': float, 'qty': float}
  df = pd.read_excel(os.path.join(sys.path[0], d.get('csv')), dtype=str)
  for col, col_type in dtype_dic.items():
      df[col] = df[col].astype(col_type)
  df = df.replace('None','')
  df = df.replace('nan','')
  df.to_csv('test.csv', index=False, header=False, quotechar='"', quoting=csv.QUOTE_NONNUMERIC)
  </code></pre>