Skip to content

Commit 38b71b0

Browse files
author
cloudboat
committed
Fix the accuracy
1 parent 2ba57e0 commit 38b71b0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/indexes/datetimelike.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def mean(self, *, skipna: bool = True, axis: int | None = 0):
120120
>>> idx = pd.date_range("2001-01-01 00:00", periods=3)
121121
>>> idx
122122
DatetimeIndex(['2001-01-01', '2001-01-02', '2001-01-03'],
123-
dtype='datetime64[ns]', freq='D')
123+
dtype='datetime64[us]', freq='D')
124124
>>> idx.mean()
125125
Timestamp('2001-01-02 00:00:00')
126126
@@ -129,7 +129,7 @@ def mean(self, *, skipna: bool = True, axis: int | None = 0):
129129
>>> tdelta_idx = pd.to_timedelta([1, 2, 3], unit="D")
130130
>>> tdelta_idx
131131
TimedeltaIndex(['1 days', '2 days', '3 days'],
132-
dtype='timedelta64[ns]', freq=None)
132+
dtype='timedelta64[us]', freq=None)
133133
>>> tdelta_idx.mean()
134134
Timedelta('2 days 00:00:00')
135135
"""

0 commit comments

Comments
 (0)