xarray.core.accessor_dt.DatetimeAccessor.round

xarray.core.accessor_dt.DatetimeAccessor.round#

DatetimeAccessor.round(freq)[source]#

Round timestamps to specified frequency resolution.

Parameters:

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

Returns:

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