cudf.DatetimeIndex.floor#

DatetimeIndex.floor(freq)[source]#

Perform floor 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:
DatetimeIndex

Index of the same type for a DatetimeIndex

Examples

>>> import cudf
>>> gIndex = cudf.DatetimeIndex([
...     "2020-05-31 08:59:59",
...     "1999-12-31 18:44:59",
... ])
>>> gIndex.floor("T")
DatetimeIndex(['2020-05-31 08:59:00', '1999-12-31 18:44:00'], dtype='datetime64[ns]')