Skip to content

Commit a3bfdab

Browse files
committed
DOC: Correct groupby.last does not use nulls
1 parent 6947770 commit a3bfdab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/groupby/groupby.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2297,12 +2297,12 @@ def last(self, numeric_only: bool = False, min_count: int = -1):
22972297
Returns
22982298
-------
22992299
Series or DataFrame
2300-
First not non-null of values within each group.
2300+
Last not non-null of values within each group.
23012301
23022302
Examples
23032303
--------
23042304
>>> df = pd.DataFrame(dict(A=[1, 1, 3], B=[5, None, 6], C=[1, 2, 3]))
2305-
>>> df.groupby("A").first()
2305+
>>> df.groupby("A").last()
23062306
B C
23072307
A
23082308
1 5.0 2

0 commit comments

Comments
 (0)