pyarrow.compute.round_to_multiple

pyarrow.compute.round_to_multiple(x, *, memory_pool=None, options=None, multiple=1.0, round_mode='half_to_even')

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
  • x (Array-like or scalar-like) – Argument to compute function

  • memory_pool (pyarrow.MemoryPool, optional) – If not passed, will allocate memory from the default memory pool.

  • options (pyarrow.compute.RoundToMultipleOptions, optional) – Parameters altering compute function semantics.

  • multiple (optional) – Parameter for RoundToMultipleOptions constructor. Either options or multiple can be passed, but not both at the same time.

  • round_mode (optional) – Parameter for RoundToMultipleOptions constructor. Either options or round_mode can be passed, but not both at the same time.