title: converting a dataframe with array columns to a long dataframe
body: <p>I have columns which are arrays in spark DataFrame. I want to convert the dataframe to a long dataframe where each element of the array is in a new row.
  I want it to be like the one below.</p>
  
  <p>eg.</p>
  
  <pre><code>spark.createDataFrame([(['abcd','cdf','dfg'],['123']),(['a'],['45','67',98'])],['s','d']).show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/8Ildd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8Ildd.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/emohh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/emohh.png" alt="enter image description here"></a></p>