From ddb112da518ee5dcfd627ae9f9eb46017432a798 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Kimborowicz?= Date: Thu, 7 Mar 2024 19:34:22 +0800 Subject: [PATCH] [MINOR][DOCS][PYTHON] Fix documentation typo in takeSample method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### What changes were proposed in this pull request? Fixed an error in the docstring documentation for the parameter `withReplacement` of `takeSample` method in `pyspark.RDD`, should be of type `bool`, but is `list` instead. https://spark.apache.org/docs/latest/api/python/reference/api/pyspark.RDD.takeSample.html ### Why are the changes needed? They correct a mistake in the documentation. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? \- ### Was this patch authored or co-authored using generative AI tooling? No. Closes #45419 from kimborowicz/master. Authored-by: MichaƂ Kimborowicz Signed-off-by: Kent Yao (cherry picked from commit 7a429aa84a5ed2c4b6448d43e88c475919ea2210) Signed-off-by: Kent Yao --- python/pyspark/rdd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pyspark/rdd.py b/python/pyspark/rdd.py index 053727263ac4d..db9e67a05b3f0 100644 --- a/python/pyspark/rdd.py +++ b/python/pyspark/rdd.py @@ -1106,7 +1106,7 @@ def takeSample( Parameters ---------- - withReplacement : list + withReplacement : bool whether sampling is done with replacement num : int size of the returned sample