Skip to content

Commit 388de53

Browse files
natmokvalhedeershowk
authored andcommitted
DOC: correct an example in whatsnew v0.14.0.rst (pandas-dev#55182)
1 parent cde04e0 commit 388de53

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

doc/source/whatsnew/v0.14.0.rst

+8-2
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,15 @@ More consistent behavior for some groupby methods:
349349
350350
- groupby head and tail respect column selection:
351351

352-
.. ipython:: python
352+
.. code-block:: ipython
353+
354+
In [19]: g[['B']].head(1)
355+
Out[19]:
356+
B
357+
0 2
358+
2 6
353359
354-
g[['B']].head(1)
360+
[2 rows x 1 columns]
355361
356362
- groupby ``nth`` now reduces by default; filtering can be achieved by passing ``as_index=False``. With an optional ``dropna`` argument to ignore
357363
NaN. See :ref:`the docs <groupby.nth>`.

0 commit comments

Comments
 (0)