Skip to content

Commit

Permalink
DOC: correct an example in whatsnew v0.14.0.rst (pandas-dev#55182)
Browse files Browse the repository at this point in the history
  • Loading branch information
natmokval authored Sep 18, 2023
1 parent 025e6ae commit 6826845
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions doc/source/whatsnew/v0.14.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,15 @@ More consistent behavior for some groupby methods:
- groupby head and tail respect column selection:

.. ipython:: python
.. code-block:: ipython
In [19]: g[['B']].head(1)
Out[19]:
B
0 2
2 6
g[['B']].head(1)
[2 rows x 1 columns]
- groupby ``nth`` now reduces by default; filtering can be achieved by passing ``as_index=False``. With an optional ``dropna`` argument to ignore
NaN. See :ref:`the docs <groupby.nth>`.
Expand Down

0 comments on commit 6826845

Please sign in to comment.