File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -8333,14 +8333,14 @@ def update(
8333
8333
2 Parrot 24.0
8334
8334
3 Parrot 26.0
8335
8335
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
8339
8339
``.groupby()``, using the name of the specific index.
8340
8340
8341
8341
>>> 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]],
8344
8344
... names=["x", "y"])
8345
8345
>>> df.groupby(["col1", "x"]) # Fine
8346
8346
>>> df.groupby("col1", level=0) # TypeError
You can’t perform that action at this time.
0 commit comments