diff --git a/pandas/core/arrays/datetimelike.py b/pandas/core/arrays/datetimelike.py index 84a4cbbc0a447..7a6f28a86dee0 100644 --- a/pandas/core/arrays/datetimelike.py +++ b/pandas/core/arrays/datetimelike.py @@ -1457,15 +1457,16 @@ def mean(self, skipna=True): Parameters ---------- skipna : bool, default True - Whether to ignore any NaT elements + Whether to ignore any NaT elements. Returns ------- - scalar (Timestamp or Timedelta) + scalar + Timestamp or Timedelta. See Also -------- - numpy.ndarray.mean + numpy.ndarray.mean : Returns the average of array elements along a given axis. Series.mean : Return the mean value in a Series. Notes diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 4c15e4b26ed46..79d97a13e37ca 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -1169,20 +1169,22 @@ def to_flat_index(self): def to_series(self, index=None, name=None): """ - Create a Series with both index and values equal to the index keys - useful with map for returning an indexer based on an index. + Create a Series with both index and values equal to the index keys. + + Useful with map for returning an indexer based on an index. Parameters ---------- index : Index, optional - index of resulting Series. If None, defaults to original index + Index of resulting Series. If None, defaults to original index. name : str, optional - name of resulting Series. If None, defaults to name of original - index + Dame of resulting Series. If None, defaults to name of original + index. Returns ------- - Series : dtype will be based on the type of the Index values. + Series + The dtype will be based on the type of the Index values. """ from pandas import Series