DataFrame<R, C>.MakeCategorical Method

Definition

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

Overload List

MakeCategorical(C) Marks the specified column as containing categorical data.
MakeCategorical(C[]) Marks the specified columns as containing categorical data.
MakeCategorical<T>(C, Index<T>) Marks the specified column as containing categorical data.

MakeCategorical(C)

Marks the specified column as containing categorical data.
C#
public DataFrame<R, C> MakeCategorical(
	C key
)

Parameters

key  C
The key of the column.

Return Value

DataFrame<R, C>

Remarks

This method does not change the values in the column. It changes the representation to one for categorical data.

Exceptions

KeyNotFoundException

A column with key key was not found in the data frame.

MakeCategorical(C[])

Marks the specified columns as containing categorical data.
C#
public DataFrame<R, C> MakeCategorical(
	params C[] keys
)

Parameters

keys  C[]
A parameter array of keys of the column.

Return Value

DataFrame<R, C>

Remarks

This method does not change the values in the columns. It changes the representation to one for categorical data.

Exceptions

KeyNotFoundException

One or more of the keys in keys were not found in the data frame's column index.

MakeCategorical<T>(C, Index<T>)

Marks the specified column as containing categorical data.
C#
public DataFrame<R, C> MakeCategorical<T>(
	C key,
	Index<T> categoryIndex
)

Parameters

key  C
The key of the column.
categoryIndex  Index<T>
The category index to use to encode the values.

Type Parameters

T

Return Value

DataFrame<R, C>

Remarks

This method does not change the values in the column. It changes the representation to one for categorical data.

Exceptions

KeyNotFoundException

A column with key key was not found in the data frame.

See Also