Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/20070#discussion_r158744300
--- Diff:
examples/src/main/scala/org/apache/spark/examples/ml/QuantileDiscretizerExample.scala
---
@@ -31,12 +31,11 @@ object QuantileDiscretizerExample {
// $example on$
val data = Array((0, 18.0), (1, 19.0), (2, 8.0), (3, 5.0), (4, 2.2))
- val df = spark.createDataFrame(data).toDF("id", "hour")
+ val df = spark.createDataFrame(data).toDF("id", "hour").repartition(1)
--- End diff --
Although it looks weird, I think the author intended the repartition(1) to
not appear in the body of the example that's copied into the docs. I wouldn't
change this.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]