title: convert empty array to null pyspark
body: <p>I have a pyspark Dataframe:</p>
  
  <p>Dataframe example:</p>
  
  <pre><code>id |  column_1       | column_2    | column_3
  --------------------------------------------
  1  |    ["12"]       |   ["""]     |    ["67"]
  --------------------------------------------
  2  |    ["""]        |   ["78"]    |   ["90"]
  --------------------------------------------
  3  |    ["""]        |  ["93"]     |   ["56"]
  --------------------------------------------
  4  |    ["100"]      |   ["78"]    |   ["90"]
  --------------------------------------------
  </code></pre>
  
  <p>I want to convert all the values <code>["""]</code> of the columns: <code>column_1, column_2, column_3</code> <code>to null</code>. types of these 3 columns is an <code>Array</code>.</p>
  
  <p>Excpect result:</p>
  
  <pre><code>id |  column_1       | column_2    | column_3
  --------------------------------------------
  1  |    ["12"]       |   null     |    ["67"]
  --------------------------------------------
  2  |    null        |   ["78"]    |   ["90"]
  --------------------------------------------
  3  |    null        |  ["93"]     |   ["56"]
  --------------------------------------------
  4  |    ["100"]      |   ["78"]    |   ["90"]
  --------------------------------------------
  </code></pre>
  
  <p>I tried this solution bellow:</p>
  
  <pre><code>df = df.withColumn(
          "column_1",
          F.when((F.size(F.col("column_1")) == ""),
          F.lit(None)).otherwise(F.col("column_1"))
      ).withColumn(
          "column_2",
          F.when((F.size(F.col("column_2")) == ""),
          F.lit(None)).otherwise(F.col("column_2"))
      ).withColumn(
          "column_3",
          F.when((F.size(F.col("column_3")) == ""),
          F.lit(None)).otherwise(F.col("column_3"))
      )
  </code></pre>
  
  <p>But it convert all to null.
  How can I test on an empty array that contain an empty String normally, [""] not [].
  Thank you</p>