Rows
Namespace: Polars.FSharp
Module Functions
Rows.choose
Chooses values from the rows of the enumerator that satisfy the predicate.
Rows.choose : chooser: ('T -> 'U option) -> enumerator: RowEnumerator<'T> -> List<'U>Parameters
| Name | Type | Description |
|---|---|---|
chooser | ('T -> 'U option) | - |
enumerator | RowEnumerator<'T> | - |
Rows.contains
Tests if the enumerator contains the specified element using default structural equality. Short-circuits upon discovery.
Rows.contains : element: 'T -> enumerator: RowEnumerator<'T> -> boolParameters
| Name | Type | Description |
|---|---|---|
element | 'T | - |
enumerator | RowEnumerator<'T> | - |
Rows.countBy
Applies a key-generating function to each row and returns a dictionary with the frequency of each key.
Rows.countBy : projection: ('T -> 'Key) -> enumerator: RowEnumerator<'T> -> Dictionary<'Key, int64>Parameters
| Name | Type | Description |
|---|---|---|
projection | ('T -> 'Key) | - |
enumerator | RowEnumerator<'T> | - |
Rows.exists
Returns whether any row satisfies the predicate.
Rows.exists : predicate: ('T -> bool) -> enumerator: RowEnumerator<'T> -> boolParameters
| Name | Type | Description |
|---|---|---|
predicate | ('T -> bool) | - |
enumerator | RowEnumerator<'T> | - |
Rows.filter
Filters the rows of the enumerator that satisfy the predicate.
Rows.filter : predicate: ('T -> bool) -> enumerator: RowEnumerator<'T> -> List<'T>Parameters
| Name | Type | Description |
|---|---|---|
predicate | ('T -> bool) | - |
enumerator | RowEnumerator<'T> | - |
Rows.fold
Folds over the rows of the enumerator, applying the folder function to each row.
Rows.fold : folder: ('State -> ('T -> 'State)) -> initial: 'State -> enumerator: RowEnumerator<'T> -> 'StateParameters
| Name | Type | Description |
|---|---|---|
folder | ('State -> ('T -> 'State)) | - |
initial | 'State | - |
enumerator | RowEnumerator<'T> | - |
Rows.foldi
Folds over the rows of the enumerator with index.
Rows.foldi : folder: (int64 -> ('State -> ('T -> 'State))) -> initial: 'State -> enumerator: RowEnumerator<'T> -> 'StateParameters
| Name | Type | Description |
|---|---|---|
folder | (int64 -> ('State -> ('T -> 'State))) | - |
initial | 'State | - |
enumerator | RowEnumerator<'T> | - |
Rows.forall
Returns whether all rows satisfy the predicate.
Rows.forall : predicate: ('T -> bool) -> enumerator: RowEnumerator<'T> -> boolParameters
| Name | Type | Description |
|---|---|---|
predicate | ('T -> bool) | - |
enumerator | RowEnumerator<'T> | - |
Rows.groupBy
Groups the rows of the enumerator using the key-generating function, returning an idiomatic F# immutable Map of key to row list.
Rows.groupBy : keySelector: ('T -> 'Key) -> enumerator: RowEnumerator<'T> -> Map<'Key, 'T list>Parameters
| Name | Type | Description |
|---|---|---|
keySelector | ('T -> 'Key) | - |
enumerator | RowEnumerator<'T> | - |
Rows.head
Returns the first mapped row or raises InvalidOperationException if empty.
Rows.head : enumerator: RowEnumerator<'T> -> 'TParameters
| Name | Type | Description |
|---|---|---|
enumerator | RowEnumerator<'T> | - |
Rows.iter
Iterates over the rows of the enumerator, applying the action to each row.
Rows.iter : action: ('T -> unit) -> enumerator: RowEnumerator<'T> -> unitParameters
| Name | Type | Description |
|---|---|---|
action | ('T -> unit) | - |
enumerator | RowEnumerator<'T> | - |
Rows.iter2
Iterates simultaneously over two equal-length RowEnumerators, applying the action pairwise.
Rows.iter2 : action: ('T1 -> ('T2 -> unit)) -> enum1: RowEnumerator<'T1> -> enum2: RowEnumerator<'T2> -> unitParameters
| Name | Type | Description |
|---|---|---|
action | ('T1 -> ('T2 -> unit)) | - |
enum1 | RowEnumerator<'T1> | - |
enum2 | RowEnumerator<'T2> | - |
Rows.iteri
Iterates over the rows of the enumerator, applying the action with zero-based 64-bit row index.
Rows.iteri : action: (int64 -> ('T -> unit)) -> enumerator: RowEnumerator<'T> -> unitParameters
| Name | Type | Description |
|---|---|---|
action | (int64 -> ('T -> unit)) | - |
enumerator | RowEnumerator<'T> | - |
Rows.iteri2
Iterates simultaneously over two equal-length RowEnumerators with zero-based 64-bit row index.
Rows.iteri2 : action: (int64 -> ('T1 -> ('T2 -> unit))) -> enum1: RowEnumerator<'T1> -> enum2: RowEnumerator<'T2> -> unitParameters
| Name | Type | Description |
|---|---|---|
action | (int64 -> ('T1 -> ('T2 -> unit))) | - |
enum1 | RowEnumerator<'T1> | - |
enum2 | RowEnumerator<'T2> | - |
Rows.last
Returns the last mapped row or raises InvalidOperationException if empty.
Rows.last : enumerator: RowEnumerator<'T> -> 'TParameters
| Name | Type | Description |
|---|---|---|
enumerator | RowEnumerator<'T> | - |
Rows.length
Returns the total row count as a 64-bit integer.
Rows.length : enumerator: RowEnumerator<'T> -> int64Parameters
| Name | Type | Description |
|---|---|---|
enumerator | RowEnumerator<'T> | - |
Rows.map
Maps each row of the enumerator to a new value using the mapping function.
Rows.map : mapping: ('T -> 'U) -> enumerator: RowEnumerator<'T> -> seq<'U>Parameters
| Name | Type | Description |
|---|---|---|
mapping | ('T -> 'U) | - |
enumerator | RowEnumerator<'T> | - |
Rows.mapToArray
Projects all rows of the enumerator into a strongly-typed array using an inlined mapping function. Eliminates intermediate IEnumerator heap boxing and lambda allocations.
Rows.mapToArray : mapping: ('TIn -> 'TOut) -> enumerator: RowEnumerator<'TIn> -> 'TOut[]Parameters
| Name | Type | Description |
|---|---|---|
mapping | ('TIn -> 'TOut) | - |
enumerator | RowEnumerator<'TIn> | - |
Rows.mapi
Maps each row with its zero-based 64-bit row index to a lazy F# sequence.
Rows.mapi : mapping: (int64 -> ('T -> 'U)) -> enumerator: RowEnumerator<'T> -> seq<'U>Parameters
| Name | Type | Description |
|---|---|---|
mapping | (int64 -> ('T -> 'U)) | - |
enumerator | RowEnumerator<'T> | - |
Rows.reduce
Applies a function to each row, threading an accumulator argument through the computation. Raises InvalidOperationException if the enumerator has no elements.
Rows.reduce : reduction: ('T -> ('T -> 'T)) -> enumerator: RowEnumerator<'T> -> 'TParameters
| Name | Type | Description |
|---|---|---|
reduction | ('T -> ('T -> 'T)) | - |
enumerator | RowEnumerator<'T> | - |
Rows.scan
Like fold, but returns a lazy sequence of intermediate and final results.
Rows.scan : folder: ('State -> ('T -> 'State)) -> initial: 'State -> enumerator: RowEnumerator<'T> -> seq<'State>Parameters
| Name | Type | Description |
|---|---|---|
folder | ('State -> ('T -> 'State)) | - |
initial | 'State | - |
enumerator | RowEnumerator<'T> | - |
Rows.sumBy
Sums the values of the rows of the enumerator using the projection function.
Rows.sumBy : projection: ('T -> 'Num) -> enumerator: RowEnumerator<'T> -> 'NumParameters
| Name | Type | Description |
|---|---|---|
projection | ('T -> 'Num) | - |
enumerator | RowEnumerator<'T> | - |
Rows.sumBy$W
Rows.sumBy$W : get_Zero: (unit -> 'Num) -> op_Addition: ('Num -> ('Num -> 'Num)) -> projection: ('T -> 'Num) -> enumerator: RowEnumerator<'T> -> 'NumParameters
| Name | Type | Description |
|---|---|---|
get_Zero | (unit -> 'Num) | - |
op_Addition | ('Num -> ('Num -> 'Num)) | - |
projection | ('T -> 'Num) | - |
enumerator | RowEnumerator<'T> | - |
Rows.toArray
Materializes all or remaining mapped rows into an array.
Rows.toArray : enumerator: RowEnumerator<'T> -> 'T[]Parameters
| Name | Type | Description |
|---|---|---|
enumerator | RowEnumerator<'T> | - |
Rows.toList
Materializes all or remaining mapped rows into an F# immutable list.
Rows.toList : enumerator: RowEnumerator<'T> -> 'T listParameters
| Name | Type | Description |
|---|---|---|
enumerator | RowEnumerator<'T> | - |
Rows.toResizeArray
Materializes all or remaining mapped rows into a ResizeArray.
Rows.toResizeArray : enumerator: RowEnumerator<'T> -> List<'T>Parameters
| Name | Type | Description |
|---|---|---|
enumerator | RowEnumerator<'T> | - |
Rows.tryFind
Tries to find a row that satisfies the predicate.
Rows.tryFind : predicate: ('T -> bool) -> enumerator: RowEnumerator<'T> -> 'T optionParameters
| Name | Type | Description |
|---|---|---|
predicate | ('T -> bool) | - |
enumerator | RowEnumerator<'T> | - |
Rows.tryFindValue
Tries to find the first row that satisfies the predicate, returning a ValueOption to eliminate heap boxing.
Rows.tryFindValue : predicate: ('T -> bool) -> enumerator: RowEnumerator<'T> -> 'T voptionParameters
| Name | Type | Description |
|---|---|---|
predicate | ('T -> bool) | - |
enumerator | RowEnumerator<'T> | - |
Rows.tryHead
Returns the first mapped row as an option.
Rows.tryHead : enumerator: RowEnumerator<'T> -> 'T optionParameters
| Name | Type | Description |
|---|---|---|
enumerator | RowEnumerator<'T> | - |
Rows.tryHeadValue
Returns the first mapped row as a ValueOption.
Rows.tryHeadValue : enumerator: RowEnumerator<'T> -> 'T voptionParameters
| Name | Type | Description |
|---|---|---|
enumerator | RowEnumerator<'T> | - |
Rows.tryLast
Returns the last mapped row as an option.
Rows.tryLast : enumerator: RowEnumerator<'T> -> 'T optionParameters
| Name | Type | Description |
|---|---|---|
enumerator | RowEnumerator<'T> | - |
Rows.tryLastValue
Returns the last mapped row as a ValueOption.
Rows.tryLastValue : enumerator: RowEnumerator<'T> -> 'T voptionParameters
| Name | Type | Description |
|---|---|---|
enumerator | RowEnumerator<'T> | - |
Rows.tryPick
Applies the given function to successive elements, returning the first result where the function returns Some. Short-circuits immediately.
Rows.tryPick : chooser: ('T -> 'U option) -> enumerator: RowEnumerator<'T> -> 'U optionParameters
| Name | Type | Description |
|---|---|---|
chooser | ('T -> 'U option) | - |
enumerator | RowEnumerator<'T> | - |
Rows.tryPickValue
Applies the given function to successive elements, returning the first result where the function returns ValueSome. Short-circuits with zero heap allocation.
Rows.tryPickValue : chooser: ('T -> 'U voption) -> enumerator: RowEnumerator<'T> -> 'U voptionParameters
| Name | Type | Description |
|---|---|---|
chooser | ('T -> 'U voption) | - |
enumerator | RowEnumerator<'T> | - |