title: Extract column values of Dataframe as List in Apache Spark
body: <p>I want to convert a string column of a data frame to a list. What I can find from the <code>Dataframe</code> API is RDD, so I tried converting it back to RDD first, and then apply <code>toArray</code> function to the RDD. In this case, the length and SQL work just fine. However, the result I got from RDD has square brackets around every element like this <code>[A00001]</code>. I was wondering if there's an appropriate way to convert a column to a list or a way to remove the square brackets.</p>
  
  <p>Any suggestions would be appreciated. Thank you!</p>