title: python: xlrd/csv - empty cell treatment when xlrd/csv packages read objects into memory
body: <p>Is there an option to change the default way the csv and xlrd packages handle empty cells? By default empty cells are assigned an empty string value = ''. This is problematic when one is working with databases because an empty string is not a None value, which many python packages that interface with databases (SQLAlchemy for example) can handle as a <em>Null</em> for database consumption. </p>
  
  <p>For example if an empty cell occurred in a field that is suppose to be a decimal/integer/float/double then the database will throw up an exception because an insert of a string was made to a field of type decimal/integer/float/double.</p>
  
  <p>I haven't found any examples or documentation that shows how I can do this. My current approach is to inspect the data and do the following:</p>
  
  <pre><code>if item[i] == '': 
     item[i] = None
  </code></pre>
  
  <p>The problem with this is that I don't own the data and have no control over its quality. I can imagine that this would be a common occurrence since a lot of apps are using files/data that are produced by sources other then them.</p>
  
  <p>If there is a way to change the default treatment then that would be a sensible approach in my opinion.</p>