xarray.core.accessor_dt.DatetimeAccessor.floor

xarray.core.accessor_dt.DatetimeAccessor.floor#

DatetimeAccessor.floor(freq)[source]#

Round timestamps downward to specified frequency resolution.

Parameters:

freq (str) – a freq string indicating the rounding resolution e.g. “D” for daily resolution

Returns:

floor-ed timestamps (same type as values) – Array-like of datetime fields accessed for each element in values