@@ -2109,6 +2109,11 @@ class Timedelta(_Timedelta):
2109
2109
"""
2110
2110
Round the Timedelta to the specified resolution.
2111
2111
2112
+ This method rounds the Timedelta to the nearest specified frequency.
2113
+ It is useful for aligning time durations to regular intervals,
2114
+ such as seconds, minutes, or hours, ensuring that the resulting
2115
+ Timedelta is expressed in fixed units.
2116
+
2112
2117
Parameters
2113
2118
----------
2114
2119
freq : str
@@ -2143,6 +2148,11 @@ class Timedelta(_Timedelta):
2143
2148
"""
2144
2149
Return a new Timedelta floored to this resolution.
2145
2150
2151
+ This method truncates the Timedelta to the nearest specified frequency,
2152
+ effectively rounding down the duration to the nearest interval defined
2153
+ by the provided frequency string. This is useful for situations where
2154
+ you want to ensure that the Timedelta does not exceed a certain duration.
2155
+
2146
2156
Parameters
2147
2157
----------
2148
2158
freq : str
@@ -2173,11 +2183,17 @@ class Timedelta(_Timedelta):
2173
2183
"""
2174
2184
Return a new Timedelta ceiled to this resolution.
2175
2185
2186
+ This method rounds up the Timedelta to the nearest specified frequency,
2187
+ ensuring that the result represents a valid time duration aligned with
2188
+ the given frequency.
2189
+
2176
2190
Parameters
2177
2191
----------
2178
2192
freq : str
2179
- Frequency string indicating the ceiling resolution.
2180
- It uses the same units as class constructor :class:`~pandas.Timedelta`.
2193
+ The frequency level to ceil the index to. Must be a fixed
2194
+ frequency like ‘S’ (second) not ‘ME’ (month end).
2195
+ See :ref:`frequency aliases <timeseries.offset_aliases>`
2196
+ for a list of possible `freq` values.
2181
2197
2182
2198
Returns
2183
2199
-------
0 commit comments