Skip to content

Commit e1b76d9

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 1ec3cdc commit e1b76d9

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

pandas/core/indexes/datetimelike.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@
3636
NullFrequencyError,
3737
)
3838
from pandas.util._decorators import (
39-
Appender,
4039
cache_readonly,
41-
doc,
4240
)
4341

4442
from pandas.core.dtypes.common import (
@@ -57,12 +55,10 @@
5755
PeriodArray,
5856
TimedeltaArray,
5957
)
60-
from pandas.core.arrays.datetimelike import DatetimeLikeArrayMixin
6158
import pandas.core.common as com
6259
import pandas.core.indexes.base as ibase
6360
from pandas.core.indexes.base import (
6461
Index,
65-
_index_shared_docs,
6662
)
6763
from pandas.core.indexes.extension import NDArrayBackedExtensionIndex
6864
from pandas.core.indexes.range import RangeIndex
@@ -115,11 +111,11 @@ def mean(self, *, skipna: bool = True, axis: int | None = 0):
115111
116112
Examples
117113
--------
118-
>>> idx = pd.date_range('2023-01-01', periods=3)
114+
>>> idx = pd.date_range("2023-01-01", periods=3)
119115
>>> idx.mean()
120116
Timestamp('2023-01-02 00:00:00')
121117
122-
>>> idx = pd.to_timedelta([1, 2, 3], unit='D')
118+
>>> idx = pd.to_timedelta([1, 2, 3], unit="D")
123119
>>> idx.mean()
124120
Timedelta('2 days 00:00:00')
125121
"""
@@ -177,7 +173,7 @@ def freqstr(self) -> str:
177173
178174
Examples
179175
--------
180-
>>> idx = pd.date_range('2023-01-01', periods=3, freq='D')
176+
>>> idx = pd.date_range("2023-01-01", periods=3, freq="D")
181177
>>> idx.freqstr
182178
'D'
183179
"""
@@ -630,7 +626,7 @@ def inferred_freq(self) -> str | None:
630626
631627
Examples
632628
--------
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"])
634630
>>> idx.inferred_freq
635631
'2D'
636632
"""

0 commit comments

Comments
 (0)