pyarrow.compute.RoundOptions

class pyarrow.compute.RoundOptions(ndigits=0, round_mode='half_to_even')

Bases: _RoundOptions

Options for rounding numbers.

Parameters:
ndigitsint, default 0

Number of fractional digits to round to.

round_modestr, 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”.

__init__(self, ndigits=0, round_mode='half_to_even')

Methods

__init__(self[, ndigits, round_mode])

deserialize(buf)

Deserialize options for a function.

serialize(self)

static deserialize(buf)

Deserialize options for a function.

Parameters:
bufBuffer

The buffer containing the data to deserialize.

serialize(self)