Contents

prefix(_:)

Returns a new slice that contains the initial elements of the original slice.

Declaration

func prefix(_ length: Int) -> DataFrame.Slice

Parameters

  • length:

    The number of elements in the new slice. The length must be greater than or equal to zero and less than or equal to the number of elements in the original slice.

Return Value

A new slice of the underlying data frame.

See Also

Creating a Slice by Selecting Rows