title: Pyspark 2.1.0 wrapped array to array
body: <p>I have a Spark (Python) dataframe with two columns: a user ID and then an array of arrays, which is represented in Spark as a wrapped array like so:</p>
  
  <pre><code>[WrappedArray(9, 10, 11, 12), WrappedArray(20, 21, 22, 23, 24, 25, 26)] 
  </code></pre>
  
  <p>In its usual representation this would look like this:</p>
  
  <pre><code>[[9, 10, 11, 12], [20, 21, 22, 23, 24, 25, 26]]
  </code></pre>
  
  <p>I want to perform operations on each of the subarrays, for example take a third list and check whether any of its values is in the first sub-array, but I can't seem to find solutions for pyspark 2.0 (only Scala-specific older solutions like <a href="https://github.com/databricks/spark-xml/issues/192" rel="nofollow noreferrer">this</a> and <a href="https://forums.databricks.com/questions/2374/access-struct-elements-inside-dataframe.html" rel="nofollow noreferrer">this</a>).</p>
  
  <p>How does one access (and in general work with) wrapped arrays? What is an efficient way to do what I described above?</p>