@@ -2226,7 +2226,6 @@ def max(
2226
2226
2227
2227
@final
2228
2228
@Substitution (name = "groupby" )
2229
- @Appender (_common_see_also )
2230
2229
def first (self , numeric_only : bool = False , min_count : int = - 1 ):
2231
2230
"""
2232
2231
Compute the first non-null entry of each column.
@@ -2245,6 +2244,14 @@ def first(self, numeric_only: bool = False, min_count: int = -1):
2245
2244
Series or DataFrame
2246
2245
First not non-null of values within each group.
2247
2246
2247
+ See Also
2248
+ --------
2249
+ DataFrame.groupby : Apply a function groupby to each row or column of a
2250
+ DataFrame.
2251
+ DataFrame.core.groupby.GroupBy.last : Compute the last non-null entry of each
2252
+ column.
2253
+ DataFrame.core.groupby.GroupBy.nth : Take the nth row from each group.
2254
+
2248
2255
Examples
2249
2256
--------
2250
2257
>>> df = pd.DataFrame(dict(A=[1, 1, 3], B=[None, 5, 6], C=[1, 2, 3]))
@@ -2253,7 +2260,6 @@ def first(self, numeric_only: bool = False, min_count: int = -1):
2253
2260
A
2254
2261
1 5.0 1
2255
2262
3 6.0 3
2256
-
2257
2263
"""
2258
2264
2259
2265
def first_compat (obj : NDFrameT , axis : int = 0 ):
@@ -2280,7 +2286,6 @@ def first(x: Series):
2280
2286
2281
2287
@final
2282
2288
@Substitution (name = "groupby" )
2283
- @Appender (_common_see_also )
2284
2289
def last (self , numeric_only : bool = False , min_count : int = - 1 ):
2285
2290
"""
2286
2291
Compute the last non-null entry of each column.
@@ -2299,6 +2304,14 @@ def last(self, numeric_only: bool = False, min_count: int = -1):
2299
2304
Series or DataFrame
2300
2305
Last not non-null of values within each group.
2301
2306
2307
+ See Also
2308
+ --------
2309
+ DataFrame.groupby : Apply a function groupby to each row or column of a
2310
+ DataFrame.
2311
+ DataFrame.core.groupby.GroupBy.first : Compute the first non-null entry of each
2312
+ column.
2313
+ DataFrame.core.groupby.GroupBy.nth : Take the nth row from each group.
2314
+
2302
2315
Examples
2303
2316
--------
2304
2317
>>> df = pd.DataFrame(dict(A=[1, 1, 3], B=[5, None, 6], C=[1, 2, 3]))
0 commit comments