Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/3193#discussion_r20244905
--- Diff: python/pyspark/rdd.py ---
@@ -316,6 +316,34 @@ def sample(self, withReplacement, fraction, seed=None):
assert fraction >= 0.0, "Negative fraction value: %s" % fraction
return self.mapPartitionsWithIndex(RDDSampler(withReplacement,
fraction, seed).func, True)
+ def randomSplit(self, weights, seed=None):
+ """
+ Randomly splits this RDD with the provided weights.
+
+ :param weights: weights for splits, will be normalized if they
don't sum to 1
+ :param seed: random seed
+ :return: split RDDs in an list
--- End diff --
"an list" -> "a list"
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]