Skip to content

Commit 757097b

Browse files
committed
DOC: change dtype docstring to inline from @doc for SeriesGroupBy
1 parent 5f4cd4d commit 757097b

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

pandas/core/groupby/generic.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2365,7 +2365,6 @@ def is_monotonic_decreasing(self) -> Series:
23652365
"""
23662366
return self.apply(lambda ser: ser.is_monotonic_decreasing)
23672367

2368-
@doc(Series.hist.__doc__)
23692368
def hist(
23702369
self,
23712370
by=None,
@@ -2465,8 +2464,23 @@ def hist(
24652464
return result
24662465

24672466
@property
2468-
@doc(Series.dtype.__doc__)
24692467
def dtype(self) -> Series:
2468+
"""
2469+
Return the dtype object of the underlying data.
2470+
2471+
See Also
2472+
--------
2473+
Series.dtypes : Return the dtype object of the underlying data.
2474+
Series.astype : Cast a pandas object to a specified dtype dtype.
2475+
Series.convert_dtypes : Convert columns to the best possible dtypes using dtypes
2476+
supporting pd.NA.
2477+
2478+
Examples
2479+
--------
2480+
>>> s = pd.Series([1, 2, 3])
2481+
>>> s.dtype
2482+
dtype('int64')
2483+
"""
24702484
return self.apply(lambda ser: ser.dtype)
24712485

24722486
def unique(self) -> Series:

0 commit comments

Comments
 (0)