Emm...I think you can do a df.map and store each column value to your list.
[email protected] 发件人: zml张明磊 发送时间: 2015-12-25 15:33 收件人: [email protected] 抄送: [email protected] 主题: How can I get the column data based on specific column name and then stored these data in array or list ? Hi, I am a new to Scala and Spark and trying to find relative API in DataFrame to solve my problem as title described. However, I just only find this API DataFrame.col(colName : String) : Column which returns an object of Column. Not the content. If only DataFrame support such API which like Column.toArray : Type is enough for me. But now, it doesn’t. How can I do can achieve this function ? Thanks, Minglei.
