spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brandon White <bwwintheho...@gmail.com>
Subject Grouping elements in a RDD
Date Sat, 20 Jun 2015 23:48:10 GMT
How would you do a .grouped(10) on a RDD, is it possible? Here is an
example for a Scala list

scala> List(1,2,3,4).grouped(2).toList
res1: List[List[Int]] = List(List(1, 2), List(3, 4))

Would like to group n elements.

Mime
View raw message