|
36 | 36 | NullFrequencyError, |
37 | 37 | ) |
38 | 38 | from pandas.util._decorators import ( |
39 | | - Appender, |
40 | 39 | cache_readonly, |
41 | | - doc, |
42 | 40 | ) |
43 | 41 |
|
44 | 42 | from pandas.core.dtypes.common import ( |
|
57 | 55 | PeriodArray, |
58 | 56 | TimedeltaArray, |
59 | 57 | ) |
60 | | -from pandas.core.arrays.datetimelike import DatetimeLikeArrayMixin |
61 | 58 | import pandas.core.common as com |
62 | 59 | import pandas.core.indexes.base as ibase |
63 | 60 | from pandas.core.indexes.base import ( |
64 | 61 | Index, |
65 | | - _index_shared_docs, |
66 | 62 | ) |
67 | 63 | from pandas.core.indexes.extension import NDArrayBackedExtensionIndex |
68 | 64 | from pandas.core.indexes.range import RangeIndex |
@@ -115,11 +111,11 @@ def mean(self, *, skipna: bool = True, axis: int | None = 0): |
115 | 111 |
|
116 | 112 | Examples |
117 | 113 | -------- |
118 | | - >>> idx = pd.date_range('2023-01-01', periods=3) |
| 114 | + >>> idx = pd.date_range("2023-01-01", periods=3) |
119 | 115 | >>> idx.mean() |
120 | 116 | Timestamp('2023-01-02 00:00:00') |
121 | 117 |
|
122 | | - >>> idx = pd.to_timedelta([1, 2, 3], unit='D') |
| 118 | + >>> idx = pd.to_timedelta([1, 2, 3], unit="D") |
123 | 119 | >>> idx.mean() |
124 | 120 | Timedelta('2 days 00:00:00') |
125 | 121 | """ |
@@ -177,7 +173,7 @@ def freqstr(self) -> str: |
177 | 173 |
|
178 | 174 | Examples |
179 | 175 | -------- |
180 | | - >>> idx = pd.date_range('2023-01-01', periods=3, freq='D') |
| 176 | + >>> idx = pd.date_range("2023-01-01", periods=3, freq="D") |
181 | 177 | >>> idx.freqstr |
182 | 178 | 'D' |
183 | 179 | """ |
@@ -630,7 +626,7 @@ def inferred_freq(self) -> str | None: |
630 | 626 |
|
631 | 627 | Examples |
632 | 628 | -------- |
633 | | - >>> idx = pd.DatetimeIndex(['2018-01-01', '2018-01-03', '2018-01-05']) |
| 629 | + >>> idx = pd.DatetimeIndex(["2018-01-01", "2018-01-03", "2018-01-05"]) |
634 | 630 | >>> idx.inferred_freq |
635 | 631 | '2D' |
636 | 632 | """ |
|
0 commit comments