Data Frame<R, C>.Get Columns Method
Definition
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.9.0
Overload List
| Get | Returns a new data frame that contains columns selected by a column selector. |
| Get | Returns a new data frame that contains only the specified columns. |
| Get | Returns a new data frame that contains only the specified columns. |
GetColumns(ColumnSelector)
public DataFrame<R, C> GetColumns(
ColumnSelector selector
)Parameters
- selector ColumnSelector
- The selector that identifies columns to include.
Return Value
DataFrame<R, C>A new data frame containing the selected columns.
Remarks
The selector is resolved against a current schema snapshot and inspects schema metadata only; vector values are not read during selector resolution. Selected columns are distinct and returned in schema order. If selector resolves to no columns, the returned data frame has the same row index and no columns.
Dataframe-owned metadata for retained columns is preserved in the returned data frame when available. The returned data frame owns independent metadata sidecars, so later metadata changes on either data frame do not update the other.
Exceptions
| Argument | selector is null. |
| Key | selector contains an explicit key that is not present in the current schema. |
| Invalid | selector contains typed keys or a typed key predicate whose key type does not match the data frame column-key type. |
GetColumns(C[])
public DataFrame<R, C> GetColumns(
params C[] keys
)Parameters
- keys C[]
- A list of keys of the columns to return in the new data frame.
Return Value
DataFrame<R, C>A new data frame.
Remarks
The returned data frame contains the requested columns in the order supplied by keys. Dataframe-owned metadata for retained columns is copied to independent metadata sidecars in the result.
GetColumns(IEnumerable<C>)
public DataFrame<R, C> GetColumns(
IEnumerable<C> keys
)Parameters
- keys IEnumerable<C>
- The keys 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 keys. Dataframe-owned metadata for retained columns is copied to independent metadata sidecars in the result.