Skip to content

Commit 4f1b138

Browse files
author
MomIsBestFriend
committed
Displaying text as code block
XREF: #33230 (comment)
1 parent 874ccb5 commit 4f1b138

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pandas/core/groupby/groupby.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2005,6 +2005,8 @@ def cumcount(self, ascending: bool = True):
20052005
20062006
Essentially this is equivalent to
20072007
2008+
.. code-block:: python
2009+
20082010
self.apply(lambda x: pd.Series(np.arange(len(x)), x.index))
20092011
20102012
Parameters

0 commit comments

Comments
 (0)