Higher-Order Functions#
The accumulate template applies func to init and X for accumulating iteration (i.e. the result of an iteration is passed forward to the next). |
|
After sorting funcArgs based on sortingCol, aggrTopN applies func to the first top elements in funcArgs. |
|
Return 0 if at least one element of X is false or 0; return 1 otherwise. |
|
Return 1 if there is at least one element in X that is true or not 0. |
|
If func is a unary function, apply the specified function to each column of X; if func is a binary function, apply func(Xi, Yi) to each column of X and Y. |
|
If func is a unary function, apply the specified function to each row of X; if func is a binary function, apply func(Xi, Yi) to each row of X and Y. |
|
Call a function with the specified parameters. |
|
Calculate func(funcArgs) for each groupingCol group. |
|
Apply func to the permutation of all individual elements of X and Y and return a matrix. |
|
pcross is the parallel computing version of template function cross. |
|
Apply a function (specified by func or operator) to each element of args / X / Y. |
|
Calculate func(X(i),Y) for each element of X. |
|
Apply func over all pairs of consecutive elements of X. |
|
Calculate func(X, Y(i)) for each element of Y. |
|
Apply func over all pairs of consecutive elements of the object. |
|
For each group, calculate func(funcArgs) and return a scalar/vector/dictionary. |
|
The loop template is very similar to the each template. |
|
ploop is the parallel computing version of template function loop . |
|
Apply the function/operator to a moving window of the given objects. |
|
Return a Boolean value which is the result of func(X,Y). |
|
Rearrange the results of an aggregate function as a matrix. |
|
Conduct parallel computing of a vector function. |
|
The function of reduce is the same as accumulate. |
|
The rolling function applies func to a moving window of funcArgs. |
|
segmentby is very similar to contextby except for how groups are determined. |
|
Regarding null value handling, the differences between DolphinDB's built-in moving functions and Python TA-lib lie in: |
|
Apply the function/operator to a sliding window of the given objects. |
|
Apply func over a sliding window of funcArgs. |
|
Apply func over a sliding window of funcArgs. |
|
If only 1 of the elements at the same location of x and y is null, replace the null value with fillValue in the calculation. |
|
Call a function with the specified parameters. |
|
Group the data by groupingCol, then calculate func(funcArgs) and return a scalar for each group. |