pyarrow.compute.round_to_multiple#
- pyarrow.compute.round_to_multiple(x, /, multiple=1.0, round_mode='half_to_even', *, options=None, memory_pool=None)#
Round to a given multiple.
Options are used to control the rounding multiple and rounding mode. Default behavior is to round to the nearest integer and use half-to-even rule to break ties.
- Parameters:
- xArray-like or scalar-like
Argument to compute function.
- multiple
numericscalar, default 1.0 Multiple to round to. Should be a scalar of a type compatible with the argument to be rounded.
- round_mode
str, default âhalf_to_evenâ Rounding and tie-breaking mode. Accepted values are âdownâ, âupâ, âtowards_zeroâ, âtowards_infinityâ, âhalf_downâ, âhalf_upâ, âhalf_towards_zeroâ, âhalf_towards_infinityâ, âhalf_to_evenâ, âhalf_to_oddâ.
- options
pyarrow.compute.RoundToMultipleOptions, optional Alternative way of passing options.
- memory_pool
pyarrow.MemoryPool, optional If not passed, will allocate memory from the default memory pool.