DataFrame<R, C>.SelectRows Method

Definition

Namespace: Numerics.NET.DataAnalysis
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3

Overload List

SelectRows<R1>(Index<R1>, Subset) Returns a new data frame that contains the selected rows and uses the specified row index.
SelectRows<R1>(Index<R1>, Int32[]) Returns a new data frame that contains the selected rows and uses the specified row index.
SelectRows<R1>(Index<R1>, Int32, Int32, Int32) Returns a new data frame that contains the selected rows and uses the specified row index.

SelectRows<R1>(Index<R1>, Subset)

Returns a new data frame that contains the selected rows and uses the specified row index.
C#
protected virtual DataFrame<R1, C> SelectRows<R1>(
	Index<R1> index,
	Subset subset
)

Parameters

index  Index<R1>
The new row index.
subset  Subset
The subset that specifies the rows to select.

Type Parameters

R1
The element type of the row index.

Return Value

DataFrame<R1, C>
A new data frame with index as the row index that contains the rows specified by subset.

Exceptions

ArgumentOutOfRangeException

One or more values in subset is less than zero or greater than or equal to the number of rows in the data frame.

SelectRows<R1>(Index<R1>, Int32[])

Returns a new data frame that contains the selected rows and uses the specified row index.
C#
protected virtual DataFrame<R1, C> SelectRows<R1>(
	Index<R1> index,
	int[] rowIndexes
)

Parameters

index  Index<R1>
The new row index.
rowIndexes  Int32[]
The indices of the rows to include in the new data frame.

Type Parameters

R1
The element type of the row index.

Return Value

DataFrame<R1, C>
A new data frame.

Exceptions

ArgumentOutOfRangeException

One or more values in rowIndexes is less than zero or greater than or equal to the number of rows in the data frame.

SelectRows<R1>(Index<R1>, Int32, Int32, Int32)

Returns a new data frame that contains the selected rows and uses the specified row index.
C#
protected virtual DataFrame<R1, C> SelectRows<R1>(
	Index<R1> index,
	int startRow,
	int endRow,
	int stride
)

Parameters

index  Index<R1>
The new row index.
startRow  Int32
The zero-based index of the first row in the new data frame.
endRow  Int32
The (inclusive) index of the last row in the new data frame.
stride  Int32
The increment for the row index in the original data frame corresponding to an increment of one in the row index of the new data frame.

Type Parameters

R1
The element type of the row index.

Return Value

DataFrame<R1, C>
A new data frame.

Exceptions

ArgumentOutOfRangeException

startRow is less than zero or greater than or equal to the number of rows.

-or-

endRow or endRow is less than zero or greater than or equal to the number of rows.

See Also