pandas.Timedelta.round

Timedelta.round(freq)

Round the Timedelta to the specified resolution.

Parameters
freq:str

Frequency string indicating the rounding resolution.

Returns
a new Timedelta rounded to the given resolution of freq
Raises
ValueError if the freq cannot be converted

© 2008–2021, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/1.3.4/reference/api/pandas.Timedelta.round.html