We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ada0c74 commit fc13279Copy full SHA for fc13279
doc/source/user_guide/groupby.rst
@@ -146,7 +146,7 @@ the columns except the one we specify:
146
.. ipython:: python
147
148
df2 = df.set_index(["A", "B"])
149
- grouped = df2.groupby(level=df2.index.names.difference(["B"]))
+ grouped = df2.groupby(level="A")
150
grouped.sum()
151
152
The above GroupBy will split the DataFrame on its index (rows). To split by columns, first do
0 commit comments