Compute Functions¶
Aggregations¶
|
Count the number of null / non-null values. |
|
Find the index of the first occurrence of a given value. |
|
Compute the mean of a numeric array. |
|
Compute the minimum and maximum values of a numeric array. |
|
Return top-n most common values and number of times they occur in a passed numerical (chunked) array, in descending order of occurance. |
|
Calculate the standard deviation of a numeric array. |
|
Compute the sum of a numeric array. |
|
Calculate the variance of a numeric array. |
Arithmetic Functions¶
By default these functions do not detect overflow. Most functions are also
available in an overflow-checking variant, suffixed _checked
, which
throws an ArrowInvalid
exception when overflow is detected.
|
Calculate the absolute value of the argument element-wise. |
|
Calculate the absolute value of the argument element-wise. |
|
Add the arguments element-wise. |
|
Add the arguments element-wise. |
|
Divide the arguments element-wise. |
|
Divide the arguments element-wise. |
|
Multiply the arguments element-wise. |
|
Multiply the arguments element-wise. |
|
Raise arguments to power element-wise. |
|
Raise arguments to power element-wise. |
|
Left shift x by y. |
|
Left shift x by y with invalid shift check. |
|
Right shift x by y. |
|
Right shift x by y with invalid shift check. |
|
Get the signedness of the arguments element-wise. |
|
Subtract the arguments element-wise. |
|
Subtract the arguments element-wise. |
Bit-wise operations do not offer (or need) a checked variant.
|
Bit-wise AND the arguments element-wise. |
|
Bit-wise negate the arguments element-wise. |
|
Bit-wise OR the arguments element-wise. |
|
Bit-wise XOR the arguments element-wise. |
Rounding Functions¶
Rounding functions convert a numeric input into an approximate value with a simpler representation based on the rounding strategy.
|
Round up to the nearest integer. |
|
Round down to the nearest integer. |
|
Get the integral part without fractional digits. |
Logarithmic Functions¶
Logarithmic functions are also supported, and also offer _checked
variants which detect domain errors.
|
Compute natural log of arguments element-wise. |
|
Compute natural log of arguments element-wise. |
|
Compute log base 10 of arguments element-wise. |
|
Compute log base 10 of arguments element-wise. |
|
Compute natural log of (1+x) element-wise. |
|
Compute natural log of (1+x) element-wise. |
|
Compute log base 2 of arguments element-wise. |
|
Compute log base 2 of arguments element-wise. |
Trigonometric Functions¶
Trigonometric functions are also supported, and also offer _checked
variants which detect domain errors where appropriate.
|
Compute the inverse cosine of the elements argument-wise. |
|
Compute the inverse cosine of the elements argument-wise. |
|
Compute the inverse sine of the elements argument-wise. |
|
Compute the inverse sine of the elements argument-wise. |
|
Compute the principal value of the inverse tangent. |
|
Compute the inverse tangent using argument signs to determine the quadrant. |
|
Compute the cosine of the elements argument-wise. |
|
Compute the cosine of the elements argument-wise. |
|
Compute the sine of the elements argument-wise. |
|
Compute the sine of the elements argument-wise. |
|
Compute the tangent of the elements argument-wise. |
|
Compute the tangent of the elements argument-wise. |
Comparisons¶
These functions expect two inputs of the same type. If one of the inputs is null
they return null
.
|
Compare values for equality (x == y). |
|
Compare values for ordered inequality (x > y). |
|
Compare values for ordered inequality (x >= y). |
|
Compare values for ordered inequality (x < y). |
|
Compare values for ordered inequality (x <= y). |
|
Compare values for inequality (x != y). |
These functions take any number of arguments of a numeric or temporal type.
|
Find the element-wise maximum value. |
|
Find the element-wise minimum value. |
Logical Functions¶
These functions normally emit a null when one of the inputs is null. However, Kleene
logic variants are provided (suffixed _kleene
). See User Guide for details.
|
Logical ‘and’ boolean values. |
|
Logical ‘and’ boolean values (Kleene logic). |
|
Test whether all elements in a boolean array evaluate to true. |
|
Test whether any element in a boolean array evaluates to true. |
|
Invert boolean values. |
|
Logical ‘or’ boolean values. |
|
Logical ‘or’ boolean values (Kleene logic). |
|
Logical ‘xor’ boolean values. |
String Predicates¶
In these functions an empty string emits false in the output. For ASCII
variants (prefixed ascii_
) a string element with non-ASCII characters
emits false in the output.
The first set of functions emit true if the input contains only characters of a given class.
|
Classify strings as ASCII alphanumeric. |
|
Classify strings as ASCII alphabetic. |
|
Classify strings as ASCII decimal. |
|
Classify strings as ASCII lowercase. |
|
Classify strings as ASCII printable. |
|
Classify strings as ASCII whitespace. |
|
Classify strings as ASCII uppercase. |
|
Classify strings as alphanumeric. |
|
Classify strings as alphabetic. |
|
Classify strings as decimal. |
|
Classify strings as digits. |
|
Classify strings as lowercase. |
|
Classify strings as numeric. |
|
Classify strings as printable. |
|
Classify strings as whitespace. |
|
Classify strings as uppercase. |
The second set of functions also consider the order of characters in the string element.
|
Classify strings as ASCII titlecase. |
|
Classify strings as titlecase. |
The third set of functions examines string elements on a byte-by-byte basis.
|
Classify strings as ASCII. |
String Splitting¶
|
Split string according to separator. |
|
Split string according to regex pattern. |
|
Split string according to any ASCII whitespace. |
|
Split string according to any Unicode whitespace. |
String Component Extraction¶
|
Extract substrings captured by a regex pattern. |
String Joining¶
|
Join a list of strings together with a separator to form a single string. |
|
Join string arguments into one, using the last argument as the separator. |
String Transforms¶
|
For each string in strings, emit a centered string by padding both sides with the given UTF8 codeunit. |
|
For each string in strings, emit a right-aligned string by prepending the given UTF8 codeunit. |
|
Trim leading characters present in the characters arguments. |
|
Trim leading ASCII whitespace characters. |
|
Transform ASCII input to lowercase. |
|
Reverse ASCII input. |
|
For each string in strings, emit a left-aligned string by appending the given UTF8 codeunit. |
|
Trim trailing characters present in the characters arguments. |
|
Trim trailing ASCII whitespace characters. |
|
Trim leading and trailing characters present in the characters arguments. |
|
Transform ASCII input to uppercase. |
|
Compute string lengths. |
|
Replace a slice of a binary string with replacement. |
|
Replace non-overlapping substrings that match pattern by replacement. |
|
Replace non-overlapping substrings that match regex pattern by replacement. |
|
Center strings by padding with a given character. |
|
Compute UTF8 string lengths. |
|
Transform input to lowercase. |
|
Right-align strings by padding with a given character. |
|
Trim leading characters present in the characters arguments. |
|
Trim leading whitespace characters. |
|
Replace a slice of a string with replacement. |
|
Reverse utf8 input. |
|
Left-align strings by padding with a given character. |
|
Trim trailing characters present in the characters arguments. |
|
Trim trailing whitespace characters. |
|
Trim leading and trailing characters present in the characters arguments. |
|
Transform input to uppercase. |
Containment tests¶
|
Count the occurrences of substring pattern in each value of a string array. |
|
Count the non-overlapping matches of regex pattern in each value of a string array. |
|
Match strings against literal pattern. |
|
Find the index of the first occurrence of substring pattern in each value of a string array. |
|
Find the index of the first match of regex pattern in each value of a string array. |
|
Return index of each element in a set of values. |
|
Find each element in a set of values. |
|
Test if the SQL-style LIKE pattern pattern matches a value of a string array. |
|
Test if substring pattern is contained within a value of a string array. |
|
Test if regex pattern matches at any position a value of a string array. |
|
Match strings against literal pattern. |
Conversions¶
|
Cast array values to another data type. |
|
Parse timestamps. |
Replacements¶
|
Replace items using a mask and replacement values. |
Selections¶
|
Select values (or records) from array- or table-like data given boolean filter, where true values are selected. |
|
Select values (or records) from array- or table-like data given integer selection indices. |
Associative transforms¶
|
Dictionary-encode array. |
|
Compute unique elements. |
|
Compute counts of unique elements. |
Sorts and partitions¶
|
Return the indices that would partition an array around a pivot. |
|
Return the indices that would sort an array, record batch or table. |
Structural Transforms¶
|
Compute string lengths. |
|
Choose values based on multiple conditions. |
|
Select the first non-null value in each slot. |
|
Replace each null element in values with fill_value. |
|
Choose values based on a condition. |
|
Return true if value is finite. |
|
Return true if infinity. |
|
Return true if NaN. |
|
Return true if null. |
|
Return true if non-null. |
|
Compute list lengths. |
|
Flatten list values. |
|
Compute parent indices of nested list values. |