Contents

randomSplit(by:using:)

Generates two data frame slices by randomly splitting the rows of the data table type with a random-number generator.

Declaration

func randomSplit<G>(by proportion: Double, using generator: inout G) -> (DataFrame.Slice, DataFrame.Slice) where G : RandomNumberGenerator

Parameters

  • proportion:

    A proportion in the range [0.0, 1.0].

  • generator:

    A random-number generator.

Return Value

A tuple of two data frame slices.

See Also

Creating Two Slices by Splitting Rows