Data Frame<R, C>.Add Column Method
Definition
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Overload List
Add | Adds a column to the data frame. |
Add | Adds a column to the data frame. |
Add | Adds a column to the data frame. |
AddColumn(C, IVector)
Remarks
If values has a row index with the same element type as the data frame, a left join between the data frame's index and that index is used to determine the order of the elements of values in the new column.
If values has no index, or if the index has a different element type, all elements are added in the order provided. If the data frame has more rows than are present in values, missing values are appended. If the data frame has fewer rows, values is truncated.
Exceptions
Invalid | The data frame already contains a column with the specified key. |
AddColumn<T>(C, Vector<T>)
public DataFrame<R, C> AddColumn<T>(
C key,
Vector<T> values
)
Parameters
Type Parameters
- T
Return Value
DataFrame<R, C>Remarks
If values has a row index with the same element type as the data frame, a left join between the data frame's index and that index is used to determine the order of the elements of values in the new column.
If values has no index, or if the index has a different element type, all elements are added in the order provided. If the data frame has more rows than are present in values, missing values are appended. If the data frame has fewer rows, values is truncated.
AddColumn<T>(C, IList<T>)
public DataFrame<R, C> AddColumn<T>(
C key,
IList<T> values
)
Parameters
Type Parameters
- T
Return Value
DataFrame<R, C>Remarks
If values has a row index with the same element type as the data frame, a left join between the data frame's index and that index is used to determine the order of the elements of values in the new column.
If values has no index, or if the index has a different element type, all elements are added in the order provided. If the data frame has more rows than are present in values, missing values are appended. If the data frame has fewer rows, values is truncated.