DataFrame.Sample(Double, Boolean, Nullable<Int64>) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a new DataFrame
by sampling a fraction of rows (without replacement),
using a user-supplied seed.
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
Parameters
- fraction
- Double
Fraction of rows
- withReplacement
- Boolean
Sample with replacement or not
Returns
DataFrame object