scala - how to convert Array[org.apache.spark.sql.Row] to Array[Int] -


i'm trying convert array[row] array[int] in vain. appreciate help

scala> res17(0).toint <console>:30: error: value toint not member of org.apache.spark.sql.row           res17(0).toint                    ^  scala> res17(0) res28: org.apache.spark.sql.row = [1,0]  scala> res17(0).toarray <console>:30: error: value toarray not member of org.apache.spark.sql.row           res17(0).toarray                    ^  scala> res17 res30: array[org.apache.spark.sql.row] = array([1,0]) 

just map getint:

val rows: array[row] = ??? rows.map(_.getint(0)) 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -