DataFrame<R, C>.GetColumnsAt Method

Definition

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

Overload List

GetColumnsAt(IEnumerable<Int32>) Returns a new data frame that contains only the specified columns.
GetColumnsAt(Int32[]) Returns a new data frame that contains only the specified columns.

GetColumnsAt(IEnumerable<Int32>)

Returns a new data frame that contains only the specified columns.
C#
public DataFrame<R, C> GetColumnsAt(
	IEnumerable<int> indexes
)

Parameters

indexes  IEnumerable<Int32>
A sequence of column indexes.

Return Value

DataFrame<R, C>
A new data frame.

Remarks

The returned data frame contains the requested columns in the order supplied by indexes. Dataframe-owned metadata for retained columns is copied to independent metadata sidecars in the result.

GetColumnsAt(Int32[])

Returns a new data frame that contains only the specified columns.
C#
public DataFrame<R, C> GetColumnsAt(
	params int[] indexes
)

Parameters

indexes  Int32[]
An array of zero-based indexes of the columns to return.

Return Value

DataFrame<R, C>
A new data frame.

Remarks

The returned data frame contains the requested columns in the order supplied by indexes. Dataframe-owned metadata for retained columns is copied to independent metadata sidecars in the result.

Exceptions

ArgumentException

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

See Also