DataFrame.Sample(Double, Boolean, Nullable<Int64>) 方法

定义

通过使用用户提供的种子对 (的一小部分行采样而不替换) ,返回新的 DataFrame

public Microsoft.Spark.Sql.DataFrame Sample (double fraction, bool withReplacement = false, long? seed = default);
member this.Sample : double * bool * Nullable<int64> -> Microsoft.Spark.Sql.DataFrame
Public Function Sample (fraction As Double, Optional withReplacement As Boolean = false, Optional seed As Nullable(Of Long) = Nothing) As DataFrame

参数

fraction
Double

行的分数

withReplacement
Boolean

带替换或不替换的示例

seed
Nullable<Int64>

可选随机种子

返回

DataFrame 对象

适用于