title: Replace empty strings with None/null values in DataFrame
body: <p>I have a <a href="https://spark.apache.org/docs/1.5.0/api/python/pyspark.sql.html#pyspark.sql.DataFrame" rel="noreferrer">Spark 1.5.0 DataFrame</a> with a mix of <code>null</code> and empty strings in the same column.  I want to convert all empty strings in all columns to <code>null</code> (<code>None</code>, in Python).  The DataFrame may have hundreds of columns, so I'm trying to avoid hard-coded manipulations of each column.</p>
  
  <p>See my attempt below, which results in an error.</p>
  
  <pre><code>from pyspark.sql import SQLContext
  sqlContext = SQLContext(sc)
  
  ## Create a test DataFrame
  testDF = sqlContext.createDataFrame([Row(col1='foo', col2=1), Row(col1='', col2=2), Row(col1=None, col2='')])
  testDF.show()
  ## +----+----+
  ## |col1|col2|
  ## +----+----+
  ## | foo|   1|
  ## |    |   2|
  ## |null|null|
  ## +----+----+
  
  ## Try to replace an empty string with None/null
  testDF.replace('', None).show()
  ## ValueError: value should be a float, int, long, string, list, or tuple
  
  ## A string value of null (obviously) doesn't work...
  testDF.replace('', 'null').na.drop(subset='col1').show()
  ## +----+----+
  ## |col1|col2|
  ## +----+----+
  ## | foo|   1|
  ## |null|   2|
  ## +----+----+
  </code></pre>