Data Frame<R, C>.Map And Replace Method
Definition
Namespace: Numerics.NET.DataAnalysis
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Overload List
Map | Applies the specified function to selected columns. |
Map | Applies the specified function to selected columns and replaces the columns with the mapped columns. |
Map | Applies the specified function to selected columns. |
Map | Applies the specified function to selected columns. |
Map | Applies the specified function to selected columns and replaces the columns with the mapped columns. |
Map | Applies the specified function to selected columns. |
MapAndReplace(C, Func<IVector, IVector>, C)
Applies the specified function to selected columns.
public DataFrame<R, C> MapAndReplace(
C columnKey,
Func<IVector, IVector> function,
C newColumnKey
)
Parameters
- columnKey C
- the key of the column to map.
- function Func<IVector, IVector>
- The function to apply.
- newColumnKey C
- The list of keys of the mapped columns. If this value is null, the original column keys are used.
Return Value
DataFrame<R, C>A new data frame whose columns are function applied to the column with key in columnKey and column keys specified by newColumnKey.
Exceptions
Key | One or more of the keys in columnKey could not be found in the column index. |
MapAndReplace<T>(C, Func<Vector<T>, IVector>, C)
Applies the specified function to selected columns.
public DataFrame<R, C> MapAndReplace<T>(
C columnKey,
Func<Vector<T>, IVector> function,
C newColumnKey
)
Parameters
- columnKey C
- the key of the column to map.
- function Func<Vector<T>, IVector>
- The function to apply.
- newColumnKey C
- The list of keys of the mapped columns. If this value is null, the original column keys are used.
Type Parameters
- T
Return Value
DataFrame<R, C>A new data frame whose columns are function applied to the column with key in columnKey and column keys specified by newColumnKey.
Exceptions
Key | One or more of the keys in columnKey could not be found in the column index. |
MapAndReplace(IList<C>, Func<IVector, IVector>, IList<C>)
Applies the specified function to selected columns and replaces
the columns with the mapped columns.
public DataFrame<R, C> MapAndReplace(
IList<C> columnKeys,
Func<IVector, IVector> function,
IList<C> newColumnKeys
)
Parameters
- columnKeys IList<C>
- A list of keys of the columns to map.
- function Func<IVector, IVector>
- The function to apply.
- newColumnKeys IList<C>
- The list of keys of the mapped columns. If this value is null, the original column keys are used.
Return Value
DataFrame<R, C>A new data frame whose columns are function applied to the columns with key in columnKeys and column keys specified by newColumnKeys.
Exceptions
Key | One or more of the keys in columnKeys could not be found in the column index. |
MapAndReplace(IList<C>, Func<IVector, IVector>, Func<C, C>)
Applies the specified function to selected columns.
public DataFrame<R, C> MapAndReplace(
IList<C> columnKeys,
Func<IVector, IVector> function,
Func<C, C> keyGenerator
)
Parameters
- columnKeys IList<C>
- A list of keys of the columns to map.
- function Func<IVector, IVector>
- The function to apply.
- keyGenerator Func<C, C>
- A function that maps old column keys to new column keys.
Return Value
DataFrame<R, C>A new data frame whose columns are function applied to the columns with key in columnKeys and column keys specified by keyGenerator applied to each key in columnKeys.
Exceptions
Key | One or more of the keys in columnKeys could not be found in the column index. |
MapAndReplace<T>(IList<C>, Func<Vector<T>, IVector>, IList<C>)
Applies the specified function to selected columns and replaces
the columns with the mapped columns.
public DataFrame<R, C> MapAndReplace<T>(
IList<C> columnKeys,
Func<Vector<T>, IVector> function,
IList<C> newColumnKeys
)
Parameters
- columnKeys IList<C>
- A list of keys of the columns to map.
- function Func<Vector<T>, IVector>
- The function to apply.
- newColumnKeys IList<C>
- The list of keys of the mapped columns. If this value is null, the original column keys are used.
Type Parameters
- T
Return Value
DataFrame<R, C>A new data frame whose columns are function applied to the columns with key in columnKeys and column keys specified by newColumnKeys.
Exceptions
Key | One or more of the keys in columnKeys could not be found in the column index. |
MapAndReplace<T>(IList<C>, Func<Vector<T>, IVector>, Func<C, C>)
Applies the specified function to selected columns.
public DataFrame<R, C> MapAndReplace<T>(
IList<C> columnKeys,
Func<Vector<T>, IVector> function,
Func<C, C> keyGenerator
)
Parameters
- columnKeys IList<C>
- A list of keys of the columns to map.
- function Func<Vector<T>, IVector>
- The function to apply.
- keyGenerator Func<C, C>
- A function that maps old column keys to new column keys.
Type Parameters
- T
Return Value
DataFrame<R, C>A new data frame whose columns are function applied to the columns with key in columnKeys and column keys specified by keyGenerator applied to each key in columnKeys.
Exceptions
Key | One or more of the keys in columnKeys could not be found in the column index. |