Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K

pandas.Timedelta.round#

Timedelta.round(freq)#

Round the Timedelta to the specified resolution.

Parameters:
freqstr

Frequency string indicating the rounding resolution.It uses the same units as class constructorTimedelta.

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

Examples

>>>td=pd.Timedelta('1001ms')>>>tdTimedelta('0 days 00:00:01.001000')>>>td.round('s')Timedelta('0 days 00:00:01')

[8]ページ先頭

©2009-2025 Movatter.jp