title: Comparing two arrays and getting the difference in PySpark
body: <p>I have two array fields in a data frame.</p>
  
  <p><a href="https://i.stack.imgur.com/gJzmk.png" rel="noreferrer"><img src="https://i.stack.imgur.com/gJzmk.png" alt="enter image description here"></a></p>
  
  <p>I have a requirement to compare these two arrays and get the difference as an array(new column) in the same data frame.</p>
  
  <p>Expected output is:</p>
  
  <p><a href="https://i.stack.imgur.com/nhuKh.png" rel="noreferrer"><img src="https://i.stack.imgur.com/nhuKh.png" alt="enter image description here"></a></p>
  
  <p>Column B is a subset of column A. Also the words is going to be in the same order in both arrays.</p>
  
  <p>Can any one please help me to get a solution for this?</p>