We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 339a554 commit 9cf4b28Copy full SHA for 9cf4b28
pandas/core/indexes/datetimes.py
@@ -1003,6 +1003,14 @@ def date_range(
1003
"""
1004
if freq is None and com.any_none(periods, start, end):
1005
freq = "D"
1006
+
1007
+ if unit is None and freq is not None:
1008
+ offset = to_offset(freq)
1009
+ if offset is not None:
1010
+ unit = offset.n
1011
1012
+ if unit is None:
1013
+ unit = 'ns'
1014
1015
dtarr = DatetimeArray._generate_range(
1016
start=start,
0 commit comments