xarray.DataArray.dt.floor

DataArray.dt.floor(freq)

Round timestamps downward to specified frequency resolution.

Parameters

freq (a freq string indicating the rounding resolution) – e.g. ‘D’ for daily resolution

Returns

floor-ed timestamps – Array-like of datetime fields accessed for each element in values

Return type

same type as values