Skip to content

Commit af8be1d

Browse files
Backport PR #52311 on branch 2.0.x (DOC: Clarify Timestamp(unit=) will not necessarily set unit) (#52360)
Backport PR #52311: DOC: Clarify Timestamp(unit=) will not necessarily set unit Co-authored-by: Matthew Roeschke <[email protected]>
1 parent 39e0505 commit af8be1d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pandas/_libs/tslibs/timestamps.pyx

+3
Original file line numberDiff line numberDiff line change
@@ -1290,6 +1290,9 @@ class Timestamp(_Timestamp):
12901290
Unit used for conversion if ts_input is of type int or float. The
12911291
valid values are 'D', 'h', 'm', 's', 'ms', 'us', and 'ns'. For
12921292
example, 's' means seconds and 'ms' means milliseconds.
1293+
1294+
For float inputs, the result will be stored in nanoseconds, and
1295+
the unit attribute will be set as ``'ns'``.
12931296
fold : {0, 1}, default None, keyword-only
12941297
Due to daylight saving time, one wall clock time can occur twice
12951298
when shifting from summer to winter time; fold describes whether the

0 commit comments

Comments
 (0)