Reputation: 89
I am trying to get the first 15 columns from a DataFrame that contains more than 500 cols. But I don't know how to do it because is my first time using Scala Spark.
I was searching but didn't find anything, just how to get cols by name, for example:
val df2 = df.select("firstColName", "secondColeName")
How can i do this by index?
Thanks in advance!
Upvotes: 1
Views: 226