Spark RDD - histogram详解
histogram - - 直方图val a = sc.parallelize(List(1.1,1.2,1.3,2.0,2.1,7.4,7.5,7.6,8.8,9.0),3)
a.histogram(5)
res0:(Array[Double], Array[Long]) = (Array(1.1, 2.68, 4.26, 5.84, 7.42, 9.0),Array(5, 0, 0, 1
原创
2017-10-23 20:25:55 ·
2266 阅读 ·
0 评论