title: Handling empty value in Excel by pandas read_excel()
body: <p>I commented a closed issue in <a href="https://github.com/pandas-dev/pandas/issues/20377" rel="nofollow noreferrer">Pandas github repo</a>:</p>
  
  <p>Treating an empty value in Excel as <code>nan</code> has another side effect: integer will be converted to float. Subsequent operation on that columns will have other effects again.</p>
  
  <p>Also <code>read_excel()</code> does not honor empty value handling offered by function in converters:</p>
  
  <p>I have an Excel file <code>temp.xlsx</code> with the following data:</p>
  
  <p><a href="https://i.stack.imgur.com/jsOAm.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jsOAm.jpg" alt="enter image description here"></a></p>
  
  <p>There are white spaces surrounding values in <code>Key3</code> column.</p>
  
  <pre><code>Key1,Key2,Key3,Key4
  0,11,  Apple  ,1.12
  1,12,,1.02
  2,13,  Orange,
  3,  ,Banana  ,0.01
  </code></pre>
  
  <p>This is the code:</p>
  
  <pre><code>import numpy as np
  import pandas as pd
  
  def handle_string(value):
      return value.replace(' ', '')
  
  def handle_integer(value):
      if value == '':
          return 0
      else:
          int(value)
  
  def handle_float(value):
      if value == '':
          return 0.0
      else:
          float(value)
  
  df = pd.read_excel(
          'temp.xlsx',
  )
  print(df)
  print(f"type(df.loc[3,'Key2']) = {type(df.loc[3,'Key2'])}")
  print(f"type(df.loc[1,'Key3']) = {type(df.loc[1,'Key3'])}")
  print(f"type(df.loc[2,'Key4']) = {type(df.loc[2,'Key4'])}")
  
  print('')
  
  df = pd.read_excel(
          'temp.xlsx',
          converters={\
              'Key1' : handle_integer,
              'Key2' : handle_integer,
              'Key3' : handle_string,
              'Key4' : handle_float,
          }
  )
  print(df)
  print(f"type(df.loc[3,'Key2']) = {type(df.loc[3,'Key2'])}")
  print(f"type(df.loc[1,'Key3']) = {type(df.loc[1,'Key3'])}")
  print(f"type(df.loc[2,'Key4']) = {type(df.loc[2,'Key4'])}")
  </code></pre>
  
  <p>The output:</p>
  
  <pre><code>   Key1  Key2        Key3  Key4
  0     0  11.0     Apple    1.12
  1     1  12.0         NaN  1.02
  2     2  13.0    Orange     NaN
  3     3   NaN    Banana    0.01
  type(df.loc[3,'Key2']) = &lt;class 'numpy.float64'&gt;
  type(df.loc[1,'Key3']) = &lt;class 'float'&gt;
  type(df.loc[2,'Key4']) = &lt;class 'numpy.float64'&gt;
  
     Key1  Key2    Key3  Key4
  0  None   NaN   Apple   NaN
  1  None   NaN     NaN   NaN
  2  None   NaN  Orange   0.0
  3  None   0.0  Banana   NaN
  type(df.loc[3,'Key2']) = &lt;class 'numpy.float64'&gt;
  type(df.loc[1,'Key3']) = &lt;class 'float'&gt;
  type(df.loc[2,'Key4']) = &lt;class 'numpy.float64'&gt;
  </code></pre>
  
  <p><code>dtype</code> parameters have lower priority than <code>converters</code>.</p>