ColumnSelector Class

Describes a reusable selection of data frame columns.

Definition

Namespace: Numerics.NET.DataAnalysis.Schema
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.8.0
C#
public abstract class ColumnSelector
Inheritance
Object  →  ColumnSelector

Remarks

ColumnSelector is non-generic because most selector criteria do not depend on the data frame row-key or column-key type. Selectors such as All, None, OfType<T>(), AssignableTo<T>(), IsCategorical(), and HasRole(ColumnRole) can resolve against any DataFrameSchema<R, C>.

Selectors that carry typed column keys are created with generic factory methods such as Key<C>(C) and Keys<C>(C[]). Typed key predicates are created with Where<C>(Func<ColumnSchema<C>, Boolean>). These selectors must be resolved against schemas with the same column-key type.

Selector resolution uses schema metadata only; it does not read vector values. Resolved columns are distinct and returned in schema order, regardless of the order in which explicit keys were supplied.

Selectors based on predicates, element types, roles, or categorical metadata can resolve to an empty selection. Selectors that contain explicit keys validate those keys during resolution and throw if a key is missing.

Constructors

ColumnSelectorInitializes a new instance of the ColumnSelector class

Properties

All Gets a selector that selects every column in schema order.
None Gets a selector that selects no columns.

Methods

AssignableTo(Type) Creates a selector for columns whose element type is assignable to the specified type.
AssignableTo<T>() Creates a selector for columns whose element type is assignable to T.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Except(ColumnSelector) Excludes columns selected by another selector.
Except<C>(C[]) Excludes the specified explicit column keys.
Except<C>(IEnumerable<C>) Excludes the specified explicit column keys.
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
HasRole Creates a selector for columns with the specified schema role.
IsCategorical Creates a selector for representationally categorical columns.
Key<C> Creates a selector for one explicit column key.
Keys<C>(IEnumerable<C>) Creates a selector for the specified explicit column keys.
Keys<C>(C[]) Creates a selector for the specified explicit column keys.
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
OfType(Type) Creates a selector for columns whose element type exactly matches the specified type.
OfType<T>() Creates a selector for columns whose element type exactly matches T.
Resolve<R, C> Resolves this selector against a data frame schema.
ToStringReturns a string that represents the current object.
(Inherited from Object)
Where(Func<IColumnSchema, Boolean>) Creates a selector from a key-independent predicate over column schemas.
Where<C>(Func<ColumnSchema<C>, Boolean>) Creates a selector from a typed predicate over column schemas.

See Also