We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5462538 commit 862addfCopy full SHA for 862addf
doc/source/user_guide/cookbook.rst
@@ -312,7 +312,7 @@ The :ref:`multindexing <advanced.hierarchical>` docs.
312
df.columns = pd.MultiIndex.from_tuples([tuple(c.split("_")) for c in df.columns])
313
df
314
# Now stack & Reset
315
- df = df.stack(0).reset_index(1)
+ df = df.stack(0).reset_index(level=1)
316
317
# And fix the labels (Notice the label 'level_1' got added automatically)
318
df.columns = ["Sample", "All_X", "All_Y"]
0 commit comments