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
(self, freq: str)
| 300 | return self._tslib_round_accessor("ceil", freq) |
| 301 | |
| 302 | def round(self, freq: str) -> T_DataArray: |
| 303 | """ |
| 304 | Round timestamps to specified frequency resolution. |
| 305 | |
| 306 | Parameters |
| 307 | ---------- |
| 308 | freq : str |
| 309 | a freq string indicating the rounding resolution e.g. "D" for daily resolution |
| 310 | |
| 311 | Returns |
| 312 | ------- |
| 313 | rounded timestamps : same type as values |
| 314 | Array-like of datetime fields accessed for each element in values |
| 315 | """ |
| 316 | return self._tslib_round_accessor("round", freq) |
| 317 | |
| 318 | |
| 319 | class DatetimeAccessor(TimeAccessor[T_DataArray]): |