apply_reduce module¶
Generic Numba-compiled functions for mapping, applying, and reducing.
all_reduce_nb function¶
Get whether all of the elements are True.
any_reduce_nb function¶
Get whether any of the elements are True.
apply_and_reduce_1d_meta_nb function¶
Meta version of apply_and_reduce_1d_nb().
apply_func_nb must accept the column index, the array, and *apply_args. Must return an array.
reduce_func_nb must accept the column index, the array of results from apply_func_nb, and *reduce_args. Must return a single value.
apply_and_reduce_1d_nb function¶
Apply apply_func_nb and reduce into a single value using reduce_func_nb.
apply_func_nb must accept the array and *apply_args. Must return an array.
reduce_func_nb must accept the array of results from apply_func_nb and *reduce_args. Must return a single value.
apply_and_reduce_meta_nb function¶
2-dim version of apply_and_reduce_1d_meta_nb().
apply_and_reduce_nb function¶
2-dim version of apply_and_reduce_1d_nb().
apply_meta_nb function¶
Meta version of apply_nb() that prepends the column index to the arguments of apply_func_nb.
apply_nb function¶
Apply function on each column of an object.
apply_func_nb must accept the array and *args. Must return a single value or an array of shape a.shape[1].
argmax_reduce_nb function¶
Get position of max.
argmin_reduce_nb function¶
Get position of min.
corr_reduce_grouped_meta_nb function¶
Get correlation coefficient. Ignores NaN.
count_reduce_nb function¶
Get count. Ignores NaN.
cov_reduce_grouped_meta_nb function¶
Get correlation coefficient. Ignores NaN.
describe_reduce_nb function¶
Get descriptive statistics. Ignores NaN.
Numba equivalent to pd.Series(arr).describe(perc).
first_index_reduce_nb function¶
Get index of first non-NA element.
first_reduce_nb function¶
Get first non-NA element.
flatten_forder_nb function¶
Flatten the array in F order.
flatten_grouped_nb function¶
Flatten each group of columns.
flatten_uniform_grouped_nb function¶
Flatten each group of columns of the same length.
groupby_reduce_1d_meta_nb function¶
Meta version of groupby_reduce_1d_nb().
reduce_func_nb must accept the array of indices in the group, the group index, the column index, and *args. Must return a single value.
groupby_reduce_1d_nb function¶
Provide group-by reduce calculations.
reduce_func_nb must accept the array and *args. Must return a single value.
groupby_reduce_meta_nb function¶
2-dim version of groupby_reduce_1d_meta_nb().
groupby_reduce_nb function¶
2-dim version of groupby_reduce_1d_nb().
groupby_transform_meta_nb function¶
Meta version of groupby_transform_nb().
transform_func_nb must accept the array of indices in the group, the group index, and *args. Must return a scalar or an array that broadcasts against the group's shape.
groupby_transform_nb function¶
Provide group-by transform calculations.
transform_func_nb must accept the 2-dim array of the group and *args. Must return a scalar or an array that broadcasts against the group array's shape.
last_index_reduce_nb function¶
Get index of last non-NA element.
last_reduce_nb function¶
Get last non-NA element.
map_1d_meta_nb function¶
Meta version of map_1d_nb().
map_func_nb must accept the row index, the column index, and *args. Must return a single value.
map_1d_nb function¶
Map elements element-wise using map_func_nb.
map_func_nb must accept the element and *args. Must return a single value.
map_meta_nb function¶
2-dim version of map_1d_meta_nb().
map_nb function¶
2-dim version of map_1d_nb().
max_reduce_nb function¶
Get max. Ignores NaN.
mean_reduce_nb function¶
Get mean. Ignores NaN.
median_reduce_nb function¶
Get median. Ignores NaN.
min_reduce_nb function¶
Get min. Ignores NaN.
nonzero_prod_reduce_nb function¶
Get product. Ignores zero and NaN. Default value is zero.
nth_index_reduce_nb function¶
Get index of n-th element including NA elements.
nth_reduce_nb function¶
Get n-th element.
prod_reduce_nb function¶
Get product. Ignores NaN.
proximity_reduce_meta_nb function¶
Meta version of proximity_reduce_nb().
reduce_func_nb must accept the start row index, the end row index, the start column index, the end column index, and *args. Must return a single value.
proximity_reduce_nb function¶
Flatten window surrounding rows and columns and reduce them into a single value using reduce_func_nb.
reduce_func_nb must accept the array and *args. Must return a single value.
reduce_flat_grouped_nb function¶
Same as reduce_grouped_nb() but passes flattened array.
reduce_flat_grouped_to_array_nb function¶
Same as reduce_grouped_to_array_nb() but passes flattened array.
reduce_grouped_meta_nb function¶
Meta version of reduce_grouped_nb().
reduce_func_nb must accept the column indices of the group, the group index, and *args. Must return a single value.
reduce_grouped_nb function¶
Reduce each group of columns into a single value using reduce_func_nb.
reduce_func_nb must accept the 2-dim array and *args. Must return a single value.
reduce_grouped_to_array_meta_nb function¶
Same as reduce_grouped_meta_nb() but reduce_func_nb must return an array.
reduce_grouped_to_array_nb function¶
Same as reduce_grouped_nb() but reduce_func_nb must return an array.
reduce_index_ranges_1d_meta_nb function¶
Meta version of reduce_index_ranges_1d_nb().
reduce_func_nb must accept the start row index, the end row index, the column, and *args. Must return a single value.
reduce_index_ranges_1d_nb function¶
Reduce each index range.
reduce_func_nb must accept the array and *args. Must return a single value.
reduce_index_ranges_meta_nb function¶
2-dim version of reduce_index_ranges_1d_meta_nb().
reduce_index_ranges_nb function¶
2-dim version of reduce_index_ranges_1d_nb().
reduce_meta_nb function¶
Meta version of reduce_nb().
reduce_func_nb must accept the column index and *args. Must return a single value.
reduce_nb function¶
Reduce each column into a single value using reduce_func_nb.
reduce_func_nb must accept the array and *args. Must return a single value.
reduce_to_array_meta_nb function¶
Same as reduce_meta_nb() but reduce_func_nb must return an array.
reduce_to_array_nb function¶
Same as reduce_nb() but reduce_func_nb must return an array.
rolling_freq_reduce_1d_meta_nb function¶
Meta version of rolling_freq_reduce_1d_nb().
reduce_func_nb must accept the start row index, the end row index, the column, and *args. Must return a single value.
rolling_freq_reduce_1d_nb function¶
Provide rolling, frequency-based window calculations.
reduce_func_nb must accept the array and *args. Must return a single value.
rolling_freq_reduce_meta_nb function¶
2-dim version of rolling_freq_reduce_1d_meta_nb().
rolling_freq_reduce_nb function¶
2-dim version of rolling_reduce_1d_nb().
rolling_reduce_1d_meta_nb function¶
Meta version of rolling_reduce_1d_nb().
reduce_func_nb must accept the start row index, the end row index, the column, and *args. Must return a single value.
rolling_reduce_1d_nb function¶
Provide rolling window calculations.
reduce_func_nb must accept the array and *args. Must return a single value.
rolling_reduce_meta_nb function¶
2-dim version of rolling_reduce_1d_meta_nb().
rolling_reduce_nb function¶
2-dim version of rolling_reduce_1d_nb().
rolling_reduce_two_1d_nb function¶
Provide rolling window calculations for two arrays.
reduce_func_nb must accept two arrays and *args. Must return a single value.
rolling_reduce_two_nb function¶
2-dim version of rolling_reduce_two_1d_nb().
row_apply_meta_nb function¶
Meta version of row_apply_nb() that prepends the row index to the arguments of apply_func_nb.
row_apply_nb function¶
apply_nb() but applied on rows rather than columns.
squeeze_grouped_meta_nb function¶
Meta version of squeeze_grouped_nb().
squeeze_func_nb must accept the row index, the column indices of the group, the group index, and *args. Must return a single value.
squeeze_grouped_nb function¶
Squeeze each group of columns into a single column using squeeze_func_nb.
squeeze_func_nb must accept index the array and *args. Must return a single value.
std_reduce_nb function¶
Get std. Ignores NaN.
sum_reduce_nb function¶
Get sum. Ignores NaN.
wmean_range_reduce_meta_nb function¶
Get the weighted average.