You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Include boundaries; Whether to set each bound as closed or open.
842
+
:param end: Right bound for generating dates. Accepts string or datetime-like object. Optional.
843
+
:type end: str or datetime-like, optional
872
844
873
-
.. versionadded:: 1.4.0
874
-
unit : str, default None
875
-
Specify the desired resolution of the result.
845
+
:param periods: Number of periods to generate. Mutually exclusive with one of `start` or `end`. Optional.
846
+
:type periods: int, optional
876
847
877
-
.. versionadded:: 2.0.0
878
-
**kwargs
879
-
For compatibility. Has no effect on the result.
848
+
:param freq: Frequency string or offset. Determines the spacing between dates. Defaults to 'D' (day) if not specified and enough information is provided. Accepts string (e.g., '5h'), Timedelta, datetime.timedelta, or DateOffset.
849
+
:type freq: str, Timedelta, datetime.timedelta, or DateOffset, optional
880
850
881
-
Returns
882
-
-------
883
-
DatetimeIndex
884
-
A DatetimeIndex object of the generated dates.
851
+
:param tz: Time zone name or tzinfo to localize the DatetimeIndex. If not specified, the result is timezone-naive unless timezone-aware inputs are provided.
852
+
:type tz: str or tzinfo, optional
885
853
886
-
See Also
887
-
--------
888
-
DatetimeIndex : An immutable container for datetimes.
889
-
timedelta_range : Return a fixed frequency TimedeltaIndex.
890
-
period_range : Return a fixed frequency PeriodIndex.
891
-
interval_range : Return a fixed frequency IntervalIndex.
854
+
:param normalize: Whether to normalize start/end dates to midnight before generating the date range.
855
+
:type normalize: bool, default False
892
856
893
-
Notes
894
-
-----
895
-
Of the four parameters ``start``, ``end``, ``periods``, and ``freq``,
896
-
exactly three must be specified. If ``freq`` is omitted, the resulting
897
-
``DatetimeIndex`` will have ``periods`` linearly spaced elements between
898
-
``start`` and ``end`` (closed on both sides).
857
+
:param name: Name to assign to the resulting DatetimeIndex.
858
+
:type name: str, optional
899
859
900
-
To learn more about the frequency strings, please see
901
-
:ref:`this link<timeseries.offset_aliases>`.
860
+
:param inclusive: Whether to include boundaries. One of {"both", "neither", "left", "right"}. Default is "both".
Of the four parameters (`start`, `end`, `periods`, `freq`), exactly three must be specified. If `freq` is omitted, the resulting DatetimeIndex will have `periods` linearly spaced elements between `start` and `end` (inclusive or exclusive depending on `inclusive`).
959
875
960
-
Multiples are allowed
876
+
.. seealso::
877
+
:class:`pandas.DatetimeIndex` : Immutable container for datetimes.
878
+
:func:`pandas.timedelta_range` : Return a fixed frequency TimedeltaIndex.
879
+
:func:`pandas.period_range` : Return a fixed frequency PeriodIndex.
880
+
:func:`pandas.interval_range` : Return a fixed frequency IntervalIndex.
0 commit comments