Compute Functions

Aggregations

count(arg, *[, memory_pool])

Call compute function ‘count’ with the given argument.

mean(arg, *[, memory_pool])

Call compute function ‘mean’ with the given argument.

min_max(arg, *[, options, memory_pool])

Call compute function ‘min_max’ with the given argument.

mode(array)

Return the mode (most common value) of a passed numerical (chunked) array.

stddev(arg, *[, options, memory_pool])

Call compute function ‘stddev’ with the given argument.

sum(array)

Sum the values in a numerical (chunked) array.

variance(arg, *[, options, memory_pool])

Call compute function ‘variance’ with the given argument.

Arithmetic Functions

By default these functions do not detect overflow. Each function is also available in an overflow-checking variant, suffixed _checked, which throws an ArrowInvalid exception when overflow is detected.

add(left, right, *[, memory_pool])

Call compute function ‘add’ with the given arguments.

add_checked(left, right, *[, memory_pool])

Call compute function ‘add_checked’ with the given arguments.

divide(left, right, *[, memory_pool])

Call compute function ‘divide’ with the given arguments.

divide_checked(left, right, *[, memory_pool])

Call compute function ‘divide_checked’ with the given arguments.

multiply(left, right, *[, memory_pool])

Call compute function ‘multiply’ with the given arguments.

multiply_checked(left, right, *[, memory_pool])

Call compute function ‘multiply_checked’ with the given arguments.

subtract(left, right, *[, memory_pool])

Call compute function ‘subtract’ with the given arguments.

subtract_checked(left, right, *[, memory_pool])

Call compute function ‘subtract_checked’ with the given arguments.

Comparisons

These functions expect two inputs of the same type. If one of the inputs is null they return null.

equal(left, right, *[, memory_pool])

Call compute function ‘equal’ with the given arguments.

greater(left, right, *[, memory_pool])

Call compute function ‘greater’ with the given arguments.

greater_equal(left, right, *[, memory_pool])

Call compute function ‘greater_equal’ with the given arguments.

less(left, right, *[, memory_pool])

Call compute function ‘less’ with the given arguments.

less_equal(left, right, *[, memory_pool])

Call compute function ‘less_equal’ with the given arguments.

not_equal(left, right, *[, memory_pool])

Call compute function ‘not_equal’ with the given arguments.

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.

and_(left, right, *[, memory_pool])

Call compute function ‘and’ with the given arguments.

and_kleene(left, right, *[, memory_pool])

Call compute function ‘and_kleene’ with the given arguments.

invert(arg, *[, memory_pool])

Call compute function ‘invert’ with the given argument.

or_(left, right, *[, memory_pool])

Call compute function ‘or’ with the given arguments.

or_kleene(left, right, *[, memory_pool])

Call compute function ‘or_kleene’ with the given arguments.

xor(left, right, *[, memory_pool])

Call compute function ‘xor’ with the given arguments.

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.

ascii_is_alnum(arg, *[, memory_pool])

Call compute function ‘ascii_is_alnum’ with the given argument.

ascii_is_alpha(arg, *[, memory_pool])

Call compute function ‘ascii_is_alpha’ with the given argument.

ascii_is_decimal(arg, *[, memory_pool])

Call compute function ‘ascii_is_decimal’ with the given argument.

ascii_is_lower(arg, *[, memory_pool])

Call compute function ‘ascii_is_lower’ with the given argument.

ascii_is_printable(arg, *[, memory_pool])

Call compute function ‘ascii_is_printable’ with the given argument.

ascii_is_space(arg, *[, memory_pool])

Call compute function ‘ascii_is_space’ with the given argument.

ascii_is_upper(arg, *[, memory_pool])

Call compute function ‘ascii_is_upper’ with the given argument.

utf8_is_alnum(arg, *[, memory_pool])

Call compute function ‘utf8_is_alnum’ with the given argument.

utf8_is_alpha(arg, *[, memory_pool])

Call compute function ‘utf8_is_alpha’ with the given argument.

utf8_is_decimal(arg, *[, memory_pool])

Call compute function ‘utf8_is_decimal’ with the given argument.

utf8_is_digit(arg, *[, memory_pool])

Call compute function ‘utf8_is_digit’ with the given argument.

utf8_is_lower(arg, *[, memory_pool])

Call compute function ‘utf8_is_lower’ with the given argument.

utf8_is_numeric(arg, *[, memory_pool])

Call compute function ‘utf8_is_numeric’ with the given argument.

utf8_is_printable(arg, *[, memory_pool])

Call compute function ‘utf8_is_printable’ with the given argument.

utf8_is_space(arg, *[, memory_pool])

Call compute function ‘utf8_is_space’ with the given argument.

utf8_is_upper(arg, *[, memory_pool])

Call compute function ‘utf8_is_upper’ with the given argument.

The second set of functions also consider the order of characters in the string element.

ascii_is_title(arg, *[, memory_pool])

Call compute function ‘ascii_is_title’ with the given argument.

utf8_is_title(arg, *[, memory_pool])

Call compute function ‘utf8_is_title’ with the given argument.

The third set of functions examines string elements on a byte-by-byte basis.

string_is_ascii(arg, *[, memory_pool])

Call compute function ‘string_is_ascii’ with the given argument.

String Transforms

ascii_lower(arg, *[, memory_pool])

Call compute function ‘ascii_lower’ with the given argument.

ascii_upper(arg, *[, memory_pool])

Call compute function ‘ascii_upper’ with the given argument.

utf8_lower(arg, *[, memory_pool])

Call compute function ‘utf8_lower’ with the given argument.

utf8_upper(arg, *[, memory_pool])

Call compute function ‘utf8_upper’ with the given argument.

Containment tests

index_in(arg, *[, options, memory_pool])

Call compute function ‘index_in’ with the given argument.

is_in(arg, *[, options, memory_pool])

Call compute function ‘is_in’ with the given argument.

match_substring(array, pattern)

Test if substring pattern is contained within a value of a string array.

Conversions

cast(arr, target_type[, safe])

Cast array values to another data type.

strptime(arg, *[, options, memory_pool])

Call compute function ‘strptime’ with the given argument.

Selections

filter(data, mask[, null_selection_behavior])

Select values (or records) from array- or table-like data given boolean filter, where true values are selected.

take(data, indices, *[, boundscheck, …])

Select values (or records) from array- or table-like data given integer selection indices.

Associative transforms

dictionary_encode(arg, *[, memory_pool])

Call compute function ‘dictionary_encode’ with the given argument.

unique(arg, *[, memory_pool])

Call compute function ‘unique’ with the given argument.

value_counts(arg, *[, memory_pool])

Call compute function ‘value_counts’ with the given argument.

Sorts and partitions

partition_nth_indices(arg, *[, options, …])

Call compute function ‘partition_nth_indices’ with the given argument.

sort_indices(arg, *[, memory_pool])

Call compute function ‘sort_indices’ with the given argument.

Structural Transforms

binary_length(arg, *[, memory_pool])

Call compute function ‘binary_length’ with the given argument.

fill_null(values, fill_value)

Replace each null element in values with fill_value.

is_null(arg, *[, memory_pool])

Call compute function ‘is_null’ with the given argument.

is_valid(arg, *[, memory_pool])

Call compute function ‘is_valid’ with the given argument.

list_value_length(arg, *[, memory_pool])

Call compute function ‘list_value_length’ with the given argument.

list_flatten(arg, *[, memory_pool])

Call compute function ‘list_flatten’ with the given argument.

list_parent_indices(arg, *[, memory_pool])

Call compute function ‘list_parent_indices’ with the given argument.