Data Frame<R, C>.Get Rows 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
Get | Returns a new data frame that contains only the rows with keys in the specified array. |
Get | Returns a new data frame that contains only the rows in the specified sequence. |
Get | Returns a new data frame that contains only the rows in the specified subset. |
Get | Returns a new data frame that contains only the rows specified by a boolean mask. |
Get | Returns a new data frame that contains only the rows specified by a range. |
GetRows(R[])
Returns a new data frame that contains only the rows
with keys in the specified array.
public DataFrame<R, C> GetRows(
params R[] keys
)
Parameters
- keys R[]
- An array of keys of the rows to return.
Return Value
DataFrame<R, C>A new data frame containing only the rows whose index is in keys.
GetRows(IEnumerable<R>)
Returns a new data frame that contains only the rows
in the specified sequence.
public DataFrame<R, C> GetRows(
IEnumerable<R> keys
)
Parameters
- keys IEnumerable<R>
- A sequence of keys of the rows to return.
Return Value
DataFrame<R, C>A new data frame containing only the rows whose index is in keys.
Exceptions
Argument | keys is null. |
GetRows(Subset)
Returns a new data frame that contains only the rows
in the specified subset.
public DataFrame<R, C> GetRows(
Subset subset
)
Parameters
Return Value
DataFrame<R, C>A new data frame containing only the rows in subset.
Exceptions
Argument | subset is null. |
Dimension | The original length of subset does not equal the number of rows in the data frame. |
GetRows(Vector<Boolean>)
Returns a new data frame that contains only the rows specified by a boolean mask.
public DataFrame<R, C> GetRows(
Vector<bool> mask
)
Parameters
- mask Vector<Boolean>
- A boolean vector whose elements indicate whether the corresponding row should be included in the new data frame.
Return Value
DataFrame<R, C>A new data frame containing only the rows whose corresponding value in mask is true.
GetRows(R, R)
Returns a new data frame that contains only the rows specified by a range.
public DataFrame<R, C> GetRows(
R firstKey,
R lastKey
)
Parameters
- firstKey R
- The key of the first row to be included in the result.
- lastKey R
- The key of the last row to be included in the result.
Return Value
DataFrame<R, C>A new data frame containing only the rows with a key between firstKey and lastKey.