Skip to content

Commit

Permalink
[MINOR][DOCS][PYTHON] Fix documentation typo in takeSample method
Browse files Browse the repository at this point in the history
### 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 apache#45419 from kimborowicz/master.

Authored-by: Michał Kimborowicz <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
(cherry picked from commit 7a429aa)
Signed-off-by: Kent Yao <[email protected]>
  • Loading branch information
kimborowicz authored and yaooqinn committed Mar 7, 2024
1 parent 7e5d592 commit ddb112d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/pyspark/rdd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,7 @@ def takeSample(
Parameters
----------
withReplacement : list
withReplacement : bool
whether sampling is done with replacement
num : int
size of the returned sample
Expand Down

0 comments on commit ddb112d

Please sign in to comment.