title: Pyspark- Fill an empty strings with a value
body: <p>Using <strong>Pyspark</strong> i found how to replace nulls (' ') with string, but it fills all the cells of the dataframe with this string between the letters. Maybe the system sees nulls (' ') between the letters of the strings of the non empty cells. </p>
  
  <p>These are the values of the initial dataframe:</p>
  
  <pre><code>+-----------------+-----+ 
  |CustomerRelStatus|count| 
  +-----------------+-----+ 
  | Ανοιχτος        |  477| 
  | Κλειστος        |   68| 
  | 'γνωστο         |  291| 
  |                 | 1165| 
  +-----------------+-----+
  </code></pre>
  
  <p>After using this:</p>
  
  <pre><code>newDf = df.withColumn('CustomerStatus', regexp_replace('CustomerRelStatus', '', '-1000'))
  </code></pre>
  
  <p>it returns:</p>
  
  <pre><code>+--------------------+-----+ 
  | CustomerRelStatus  |count| 
  +--------------------+-----+ 
  |-1000Α-1000ν-1000...|  477| 
  |-1000Κ-1000λ-1000...|   68| 
  |-1000ʼ-1000γ-1000...|  291| 
  |               -1000| 1165| 
  +--------------------+-----+
  </code></pre>
  
  <p>Is there any other way?</p>