Created
December 19, 2019 09:20
-
-
Save raidery/dfdaae2b2dc2a3bc272b837e7d1a3567 to your computer and use it in GitHub Desktop.
Extract column values of Dataframe as List in Apache Spark
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
df.collect().foreach(row => row.toSeq.foreach(col => { | |
col match { | |
case n: Number => println(col) | |
case _ => None | |
} | |
})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment