sampleWithoutReplacement

fun <T> DataFrame<T>.sampleWithoutReplacement(sampleSize: Int, streamNum: Int): DataFrame<T>

The data frame, is not changed. The returned data frame holds a sample of the rows.

Return

a new data frame with the sample with sampleSize rows

Parameters

T

the type of the data schema held in the data frame

sampleSize

the size to generate

streamNum

the stream number for the source of randomness


fun <T> DataFrame<T>.sampleWithoutReplacement(sampleSize: Int, stream: RNStreamIfc = KSLRandom.defaultRNStream()): DataFrame<T>

The data frame, is not changed. The returned data frame holds a sample of the rows.

Return

a new data frame with the sample sampleSize rows

Parameters

T

the type of the data schema held in the data frame

sampleSize

the size to generate

stream

the stream number for the source of randomness