pyarrow.compute.pairwise_diff#
- pyarrow.compute.pairwise_diff(input, /, period=1, *, options=None, memory_pool=None)#
Compute first order difference of an array.
Computes the first order difference of an array, It internally calls the scalar function βsubtractβ to compute
differences, so its
behavior and supported types are the same as βsubtractβ. The period can be specified in :struct:`PairwiseOptions`.
Results will wrap around on integer overflow. Use function βpairwise_diff_checkedβ if you want overflow to return an error.
- Parameters:
- inputArray-like
Argument to compute function.
- period
int
, default 1 Period for applying the period function.
- options
pyarrow.compute.PairwiseOptions
, optional Alternative way of passing options.
- memory_pool
pyarrow.MemoryPool
, optional If not passed, will allocate memory from the default memory pool.