Skip to content

Commit fc13279

Browse files
committed
Remove use of difference
1 parent ada0c74 commit fc13279

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/source/user_guide/groupby.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ the columns except the one we specify:
146146
.. ipython:: python
147147
148148
df2 = df.set_index(["A", "B"])
149-
grouped = df2.groupby(level=df2.index.names.difference(["B"]))
149+
grouped = df2.groupby(level="A")
150150
grouped.sum()
151151
152152
The above GroupBy will split the DataFrame on its index (rows). To split by columns, first do

0 commit comments

Comments
 (0)