Skip to content

Commit

Permalink
Fix doc for approxQuantile link
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Pentreath committed Mar 21, 2017
1 parent 5c272b5 commit 7fd17dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/pyspark/ml/feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,8 @@ class Imputer(JavaEstimator, HasInputCols, JavaMLReadable, JavaMLWritable):
Note that the mean/median value is computed after filtering out missing values.
All Null values in the input columns are treated as missing, and so are also imputed. For
computing median, :py:meth:`approxQuantile` is used with a relative error of 0.001.
computing median, :py:meth:`pyspark.sql.DataFrame.approxQuantile` is used with a
relative error of `0.001`.
>>> df = spark.createDataFrame([(1.0, float("nan")), (2.0, float("nan")), (float("nan"), 3.0),
... (4.0, 4.0), (5.0, 5.0)], ["a", "b"])
Expand Down

0 comments on commit 7fd17dd

Please sign in to comment.