| [ Web Proxy ] |
| Viewing: https://arrow.apache.org/docs/python/generated/../generated/pyarrow.compute.round_temporal.html | [Back] [Original] |
Section Navigation
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.
Argument to compute function.
int, default 1Number of units to round to.
str, default dayThe unit in which multiple is expressed. Accepted values are year, quarter, month, week, day, hour, minute, second, millisecond, microsecond, nanosecond.
TrueIf True, weeks start on Monday; if False, on Sunday.
FalseIf True, ceil returns a rounded value that is strictly greater than the input. For example: ceiling 1970-01-01T00:00:00 to 3 hours would yield 1970-01-01T03:00:00 if set to True and 1970-01-01T00:00:00 if set to False. This applies to the ceil_temporal function only.
FalseBy default, the origin is 1970-01-01T00:00:00. By setting this to True, rounding origin will be beginning of one less precise calendar unit. E.g.: rounding to hours will use beginning of day as origin.
By default time is rounded to a multiple of units since 1970-01-01T00:00:00. By setting calendar_based_origin to true, time will be rounded to number of units since the last greater calendar unit. For example: rounding to multiple of days since the beginning of the month or to hours since the beginning of the day. Exceptions: week and quarter are not used as greater units, therefore days will be rounded to the beginning of the month not week. Greater unit of week is a year. Note that ceiling and rounding might change sorting order of an array near greater unit change. For example rounding YYYY-mm-dd 23:00:00 to 5 hours will ceil and round to YYYY-mm-dd+1 01:00:00 and floor to YYYY-mm-dd 20:00:00. On the other hand YYYY-mm-dd+1 00:00:00 will ceil, round and floor to YYYY-mm-dd+1 00:00:00. This can break the order of an already ordered array.
pyarrow.compute.RoundTemporalOptions, optionalAlternative way of passing options.
pyarrow.MemoryPool, optionalIf not passed, will allocate memory from the default memory pool.
Copyright 2016-2026 Apache Software Foundation.
Apache Arrow, Arrow, Apache, the Apache logo, and the Apache Arrow project logo are either registered trademarks or trademarks of The Apache Software Foundation in the United States and other countries.
Created using Sphinx 9.1.0.
Built with the PyData Sphinx Theme 0.20.0.
| Web Proxy Viewer | New URL | Original Page |