Skip to content

Commit b5c7f25

Browse files
authored
DOC: Add Timedelta accepting float value (#60058)
* DOC: Solution for issue #60044 * reduce characters for each line * DOC: Make the value parameter of pandas.Timedelta can accept float * Change the expression * environment update * environment update
1 parent 1ca15d3 commit b5c7f25

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: pandas/_libs/tslibs/timedeltas.pyx

+4-2
Original file line numberDiff line numberDiff line change
@@ -1864,10 +1864,12 @@ class Timedelta(_Timedelta):
18641864
18651865
Parameters
18661866
----------
1867-
value : Timedelta, timedelta, np.timedelta64, str, or int
1867+
value : Timedelta, timedelta, np.timedelta64, str, int or float
18681868
Input value.
18691869
unit : str, default 'ns'
1870-
Denote the unit of the input, if input is an integer.
1870+
If input is an integer, denote the unit of the input.
1871+
If input is a float, denote the unit of the integer parts.
1872+
The decimal parts with resolution lower than 1 nanosecond are ignored.
18711873
18721874
Possible values:
18731875

0 commit comments

Comments
 (0)