@@ -2236,7 +2236,6 @@ def max(
2236
2236
2237
2237
@final
2238
2238
@Substitution (name = "groupby" )
2239
- @Appender (_common_see_also )
2240
2239
def first (self , numeric_only : bool = False , min_count : int = - 1 ):
2241
2240
"""
2242
2241
Compute the first non-null entry of each column.
@@ -2255,6 +2254,14 @@ def first(self, numeric_only: bool = False, min_count: int = -1):
2255
2254
Series or DataFrame
2256
2255
First not non-null of values within each group.
2257
2256
2257
+ See Also
2258
+ --------
2259
+ DataFrame.groupby : Apply a function groupby to each row or column of a
2260
+ DataFrame.
2261
+ DataFrame.core.groupby.GroupBy.last : Compute the last non-null entry of each
2262
+ column.
2263
+ DataFrame.core.groupby.GroupBy.nth : Take the nth row from each group.
2264
+
2258
2265
Examples
2259
2266
--------
2260
2267
>>> df = pd.DataFrame(dict(A=[1, 1, 3], B=[None, 5, 6], C=[1, 2, 3]))
@@ -2263,7 +2270,6 @@ def first(self, numeric_only: bool = False, min_count: int = -1):
2263
2270
A
2264
2271
1 5.0 1
2265
2272
3 6.0 3
2266
-
2267
2273
"""
2268
2274
2269
2275
def first_compat (obj : NDFrameT , axis : int = 0 ):
@@ -2290,7 +2296,6 @@ def first(x: Series):
2290
2296
2291
2297
@final
2292
2298
@Substitution (name = "groupby" )
2293
- @Appender (_common_see_also )
2294
2299
def last (self , numeric_only : bool = False , min_count : int = - 1 ):
2295
2300
"""
2296
2301
Compute the last non-null entry of each column.
@@ -2309,6 +2314,14 @@ def last(self, numeric_only: bool = False, min_count: int = -1):
2309
2314
Series or DataFrame
2310
2315
Last not non-null of values within each group.
2311
2316
2317
+ See Also
2318
+ --------
2319
+ DataFrame.groupby : Apply a function groupby to each row or column of a
2320
+ DataFrame.
2321
+ DataFrame.core.groupby.GroupBy.first : Compute the first non-null entry of each
2322
+ column.
2323
+ DataFrame.core.groupby.GroupBy.nth : Take the nth row from each group.
2324
+
2312
2325
Examples
2313
2326
--------
2314
2327
>>> df = pd.DataFrame(dict(A=[1, 1, 3], B=[5, None, 6], C=[1, 2, 3]))
0 commit comments