Data Frame.From Columns Method
Definition
Namespace: Numerics.NET.DataAnalysis
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Overload List
From | Constructs a new data frame from a dictionary of columns using a default index. |
From | Constructs a new data frame from an array of tuples of key / column pairs using a default index. |
From | Constructs a new data frame from an array of tuples of key / column pairs using a default index. |
From | Constructs a new data frame from the specified columns and column index. |
From | Creates a new data frame from the specified column labels and data. |
From | Constructs a new data frame from a dictionary of columns. |
From | Constructs a new data frame from a dictionary of columns using the specified row index. |
From | Constructs a new data frame from a dictionary of columns using the specified row index. |
From | Constructs a new data frame from the specified columns, row and column indexes. |
FromColumns<C>(IDictionary<C, Object>)
Constructs a new data frame from a dictionary of columns using a default index.
public static DataFrame<long, C> FromColumns<C>(
IDictionary<C, Object> columns
)
Parameters
- columns IDictionary<C, Object>
- A dictionary that maps column keys to columns and is indexed by row number.
Type Parameters
- C
- The type of the column index.
Return Value
DataFrame<Int64, C>A data frame whose columns are indexed by the keys of columns and contain the collections in the values of columns.
Exceptions
Argument | columns is null. |
FromColumns<R, C>(IDictionary<C, Object>)
Constructs a new data frame from a dictionary of columns.
public static DataFrame<R, C> FromColumns<R, C>(
IDictionary<C, Object> columns
)
Parameters
- columns IDictionary<C, Object>
- A dictionary that maps column keys to columns. At least one of the columns must be a vector with an index with element type R.
Type Parameters
- R
- The type of the row index.
- C
- The type of the column index.
Return Value
DataFrame<R, C>A data frame whose columns are indexed by the keys of columns and contain the collections in the values of columns. The rows are indexed by the index of the first column in the dictionary.
Exceptions
Argument | columns is null. |
Invalid | None of the columns in columns has an index with element type R. |
FromColumns<C>(ValueTuple<C, IVector>[])
Constructs a new data frame from an array of tuples of
key / column pairs using a default index.
public static DataFrame<long, C> FromColumns<C>(
params (C , IVector )[] columns
)
Parameters
- columns ValueTuple<C, IVector>[]
- An array of tuples that map column keys to columns and is indexed by row number.
Type Parameters
- C
- The type of the column index.
Return Value
DataFrame<Int64, C>A data frame whose columns are indexed by the keys of columns and contain the collections in the values of columns.
Exceptions
Argument | columns is null. |
Argument | One or more of the keys or value columns in columns is null. |
FromColumns<C>(ValueTuple<C, Object>[])
Constructs a new data frame from an array of tuples of
key / column pairs using a default index.
public static DataFrame<long, C> FromColumns<C>(
params (C , Object )[] columns
)
Parameters
- columns ValueTuple<C, Object>[]
- An array of tuples that map column keys to columns and is indexed by row number.
Type Parameters
- C
- The type of the column index.
Return Value
DataFrame<Int64, C>A data frame whose columns are indexed by the keys of columns and contain the collections in the values of columns.
Exceptions
Argument | columns is null. |
Argument | One or more of the keys or value columns in columns is null. |
FromColumns<R, C>(IDictionary<C, Object>, Index<R>)
Constructs a new data frame from a dictionary of columns using the specified row index.
public static DataFrame<R, C> FromColumns<R, C>(
IDictionary<C, Object> columns,
Index<R> rowIndex
)
Parameters
- columns IDictionary<C, Object>
- A dictionary that maps column keys to columns.
- rowIndex Index<R>
- The row index for the data frame.
Type Parameters
- R
- The type of the row index.
- C
- The type of the column index.
Return Value
DataFrame<R, C>A data frame whose columns are indexed by the keys of columns and contain the collections in the values of columns. The rows are indexed by rowIndex.
Exceptions
Argument | columns is null. -or- rowIndex is null. |
FromColumns<C>(IEnumerable<IVector>, Index<C>)
Constructs a new data frame from the specified columns and column index.
public static DataFrame<long, C> FromColumns<C>(
IEnumerable<IVector> columns,
Index<C> columnIndex
)
Parameters
- columns IEnumerable<IVector>
- A sequence of data frame columns.
- columnIndex Index<C>
- The column index of the new data frame.
Type Parameters
- C
Return Value
DataFrame<Int64, C>Exceptions
Argument | columns is null. -or- columnIndex is null. |
FromColumns<C>(IEnumerable<IVector>, IEnumerable<C>)
Creates a new data frame from the specified column labels and data.
public static DataFrame<long, C> FromColumns<C>(
IEnumerable<IVector> columns,
IEnumerable<C> columnKeys
)
Parameters
- columns IEnumerable<IVector>
- A sequence of vectors containing the data.
- columnKeys IEnumerable<C>
- A sequence of column keys.
Type Parameters
- C
- The type of the column keys
Return Value
DataFrame<Int64, C>A new data frame with the elements of columns as columns and with column index columnKeys.
Exceptions
Argument | columns is null. -or- columnKeys is null. |
FromColumns<R, C>(IDictionary<C, Object>, Index<R>, Index<C>)
Constructs a new data frame from a dictionary of columns using the specified row index.
public static DataFrame<R, C> FromColumns<R, C>(
IDictionary<C, Object> columns,
Index<R> rowIndex,
Index<C>? columnIndex
)
Parameters
- columns IDictionary<C, Object>
- A dictionary that maps column keys to columns.
- rowIndex Index<R>
- The row index for the data frame.
- columnIndex Index<C>
- The column index for the data frame.
Type Parameters
- R
- The type of the row index.
- C
- The type of the column index.
Return Value
DataFrame<R, C>A data frame whose columns are indexed by the keys of columnIndex and contain the collections in the values of columns. The rows are indexed by rowIndex. If a key in columnIndex is not found in columns, the corresponding column will contain missing values.
Exceptions
Argument | columns is null. -or- rowIndex is null. |
FromColumns<R, C>(IEnumerable<IVector>, Index<R>, Index<C>)
Constructs a new data frame from the specified columns, row and column indexes.
public static DataFrame<R, C> FromColumns<R, C>(
IEnumerable<IVector> columns,
Index<R> rowIndex,
Index<C> columnIndex
)
Parameters
- columns IEnumerable<IVector>
- A sequence of data frame columns.
- rowIndex Index<R>
- The row index of the new data frame.
- columnIndex Index<C>
- The column index of the new data frame.
Type Parameters
- R
- C
Return Value
DataFrame<R, C>Exceptions
Argument | columns is null. -or- rowIndex is null. -or- columnIndex is null. |