Skip to content

Commit 28cb2bb

Browse files
committed
updated the docstring in accordance with GH40378
1 parent 8ac46b7 commit 28cb2bb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pandas/core/frame.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -8333,14 +8333,14 @@ def update(
83338333
2 Parrot 24.0
83348334
3 Parrot 26.0
83358335
8336-
When using ``.groupby()`` on a multiple index dataframe,
8337-
do not specify both ``by`` and ``level``.
8338-
The argument validation should be done in instead be done in
8336+
When using ``.groupby()`` on a multiple index dataframe,
8337+
do not specify both ``by`` and ``level``.
8338+
The argument validation should be done in instead be done in
83398339
``.groupby()``, using the name of the specific index.
83408340
83418341
>>> df = pandas.DataFrame({"col1": ["a", "b", "c"]})
8342-
>>> df.index = pandas.MultiIndex.from_arrays([["a", "a", "b"],
8343-
... [1, 2, 1]],
8342+
>>> df.index = pandas.MultiIndex.from_arrays([["a", "a", "b"],
8343+
... [1, 2, 1]],
83448344
... names=["x", "y"])
83458345
>>> df.groupby(["col1", "x"]) # Fine
83468346
>>> df.groupby("col1", level=0) # TypeError

0 commit comments

Comments
 (0)