Skip to content

Commit a2ae6f4

Browse files
committed
DOC: Fix PR01 and reorder the parameter doc of panda.DatetimeIndex
1 parent c37ba71 commit a2ae6f4

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

pandas/core/indexes/datetimes.py

+12-5
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,17 @@ class DatetimeIndex(DatetimeTimedeltaMixin):
8787
----------
8888
data : array-like (1-dimensional), optional
8989
Optional datetime-like data to construct index with.
90-
copy : bool
91-
Make a copy of input ndarray.
9290
freq : str or pandas offset object, optional
9391
One of pandas date offset strings or corresponding objects. The string
9492
'infer' can be passed in order to set the frequency of the index as the
9593
inferred frequency upon creation.
9694
tz : pytz.timezone or dateutil.tz.tzfile
9795
Timezone of the datetime.
96+
normalize : bool, default False
97+
Normalize start/end dates to midnight before generating date range.
98+
closed : {None, 'left', 'right'}, optional
99+
Make the interval closed with respect to the given frequency to
100+
the 'left', 'right', or both sides (None, the default).
98101
ambiguous : 'infer', bool-ndarray, 'NaT', default 'raise'
99102
When clocks moved backward due to DST, ambiguous times may arise.
100103
For example in Central European Time (UTC+01), when going from 03:00
@@ -109,12 +112,16 @@ class DatetimeIndex(DatetimeTimedeltaMixin):
109112
times)
110113
- 'NaT' will return NaT where there are ambiguous times
111114
- 'raise' will raise an AmbiguousTimeError if there are ambiguous times.
112-
name : object
113-
Name to be stored in the index.
114115
dayfirst : bool, default False
115116
If True, parse dates in `data` with the day first order.
116117
yearfirst : bool, default False
117118
If True parse dates in `data` with the year first order.
119+
dtype : numpy.dtype or DatetimeTZDtype
120+
Note that the only NumPy dtype allowed is ‘datetime64[ns]’.
121+
copy : bool
122+
Make a copy of input ndarray.
123+
name : object
124+
Name to be stored in the index.
118125
119126
Attributes
120127
----------
@@ -828,7 +835,7 @@ def date_range(
828835
Normalize start/end dates to midnight before generating date range.
829836
name : str, default None
830837
Name of the resulting DatetimeIndex.
831-
closed : {None, 'left', 'right'}, optional
838+
closed : {'left', 'right'}, optional
832839
Make the interval closed with respect to the given frequency to
833840
the 'left', 'right', or both sides (None, the default).
834841
**kwargs

0 commit comments

Comments
 (0)