cudf.core.series.DatetimeProperties.ceil#

DatetimeProperties.ceil(freq: str) Series[source]#

Perform ceil operation on the data to the specified freq.

Parameters:
freqstr

One of [“D”, “H”, “T”, “min”, “S”, “L”, “ms”, “U”, “us”, “N”]. Must be a fixed frequency like ‘S’ (second) not ‘ME’ (month end). See frequency aliases for more details on these aliases.

Returns:
Series

Series with all timestamps rounded up to the specified frequency. The index is preserved.

Examples

>>> import cudf
>>> t = cudf.Series(["2001-01-01 00:04:45", "2001-01-01 00:04:58",
... "2001-01-01 00:05:04"], dtype="datetime64[ns]")
>>> t.dt.ceil("T")
0   2001-01-01 00:05:00
1   2001-01-01 00:05:00
2   2001-01-01 00:06:00
dtype: datetime64[ns]