DataFrame<R, C>.SetColumnSemantics Method

Assigns semantic metadata to the specified column.

Definition

Namespace: Numerics.NET.DataAnalysis
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.8.0
C#
public DataFrame<R, C> SetColumnSemantics(
	C key,
	ColumnSemanticInfo semantics
)

Parameters

key  C
The typed column key.
semantics  ColumnSemanticInfo
The semantic metadata to assign.

Return Value

DataFrame<R, C>
The current data frame.

Remarks

This method mutates dataframe-owned semantic metadata and returns the same data frame. Passing Default or another default semantic metadata instance clears any explicit semantic metadata for the column.

To change one semantic field, get the current metadata, call a With... method, and pass the result back to this method.

Measurement scale describes semantic meaning only. It is independent of whether the column uses ordinary vector storage or a categorical representation.

Exceptions

ArgumentNullExceptionkey or semantics is null.
KeyNotFoundExceptionkey is not present in the current column index.

See Also