pyarrow.compute.winsorize#
- pyarrow.compute.winsorize(array, /, lower_limit, upper_limit, *, options=None, memory_pool=None)#
Winsorize an array.
This function applies a winsorization transform to the input array so as to reduce the influence of potential outliers. NaNs and nulls in the input are ignored for the purpose of computing the lower and upper quantiles. The quantile limits can be changed in WinsorizeOptions.
- Parameters:
- arrayArray-like
Argument to compute function.
- lower_limit
float,between0 and 1 The quantile below which all values are replaced with the quantile’s value.
- upper_limit
float,between0 and 1 The quantile above which all values are replaced with the quantile’s value.
- options
pyarrow.compute.WinsorizeOptions, optional Alternative way of passing options.
- memory_pool
pyarrow.MemoryPool, optional If not passed, will allocate memory from the default memory pool.