pyarrow.compute.round_temporal#

pyarrow.compute.round_temporal(timestamps, /, multiple=1, unit='day', week_starts_monday=True, *, options=None, memory_pool=None)#

Round temporal values to the nearest multiple of specified time unit.

Null values emit null. An error is returned if the values have a defined timezone but it cannot be found in the timezone database.

Parameters
timestampsArray-like or scalar-like

Argument to compute function.

multipleint, default 1

Number of units to round to.

unitstr, default “day”

The unit in which multiple is expressed. Accepted values are “year”, “quarter”, “month”, “week”, “day”, “hour”, “minute”, “second”, “millisecond”, “microsecond”, “nanosecond”.

week_starts_mondaybool, default True

If True, weeks start on Monday; if False, on Sunday.

optionspyarrow.compute.RoundTemporalOptions, optional

Alternative way of passing options.

memory_poolpyarrow.MemoryPool, optional

If not passed, will allocate memory from the default memory pool.