Skip to content

Commit 4506bc5

Browse files
committed
docstring about how unit inference is done
1 parent 0a47f79 commit 4506bc5

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

pandas/core/indexes/datetimes.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -929,6 +929,8 @@ def date_range(
929929
unit : {'s', 'ms', 'us', 'ns', None}, default None
930930
Specify the desired resolution of the result.
931931
If not specified, this is inferred from the 'start', 'end', and 'freq'
932+
using the same inference as :class:`Timestamp` taking the highest
933+
resolution of the three that are provided.
932934
933935
.. versionadded:: 2.0.0
934936
**kwargs

pandas/core/indexes/timedeltas.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,8 @@ def timedelta_range(
283283
unit : {'s', 'ms', 'us', 'ns', None}, default None
284284
Specify the desired resolution of the result.
285285
If not specified, this is inferred from the 'start', 'end', and 'freq'
286+
using the same inference as :class:`Timedelta` taking the highest
287+
resolution of the three that are provided.
286288
287289
.. versionadded:: 2.0.0
288290

0 commit comments

Comments
 (0)