title: Spark dataframe update column where other colum is like with PySpark
body: <p>This creates my example dataframe:</p>
  
  <pre><code>df = sc.parallelize([('abc',),('def',)]).toDF() #(
  df = df.selectExpr("_1 as one",)
  df = df.withColumn("two", lit('z'))
  df.show()
  </code></pre>
  
  <p>looking like this:</p>
  
  <pre class="lang-none prettyprint-override"><code>+---+---+
  |one|two|
  +---+---+
  |abc|  z|
  |def|  z|
  +---+---+
  </code></pre>
  
  <p>now what I want to do is a series of <code>SQL where like</code> statements where column <code>two</code> is appended whether or not it matches </p>
  
  <p>in "pseudo code" it looks like this:</p>
  
  <pre><code>for letter in ['a','b','c','d']:
      df = df['two'].where(col('one').like("%{}%".format(letter))) += letter
  </code></pre>
  
  <p>finally resulting in a df looking like this:</p>
  
  <pre class="lang-none prettyprint-override"><code>+---+----+
  |one| two|
  +---+----+
  |abc|zabc|
  |def|  zd|
  +---+----+
  </code></pre>