From c1b9f49ee3aec5bf684579f7fe976d649134e374 Mon Sep 17 00:00:00 2001 From: phofl Date: Wed, 14 Apr 2021 22:27:47 +0200 Subject: [PATCH 1/2] Clarify docs for MultiIndex drops and levels --- pandas/core/frame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 64ec0801b5d8a..4d352ac0d747e 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -4749,7 +4749,7 @@ def drop( Remove rows or columns by specifying label names and corresponding axis, or by specifying directly index or column names. When using a multi-index, labels on different levels can be removed by specifying - the level. + the level. The now-unused levels remain in the MultiIndex._levels attribute. Parameters ---------- From 0e958fe6b71a48ae99048b4cd2e9d9e384afb789 Mon Sep 17 00:00:00 2001 From: phofl Date: Tue, 20 Apr 2021 21:58:35 +0200 Subject: [PATCH 2/2] Change reference --- pandas/core/frame.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 4d352ac0d747e..7a813d64b43b8 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -4749,7 +4749,8 @@ def drop( Remove rows or columns by specifying label names and corresponding axis, or by specifying directly index or column names. When using a multi-index, labels on different levels can be removed by specifying - the level. The now-unused levels remain in the MultiIndex._levels attribute. + the level. See the `user guide ` + for more information about the now unused levels. Parameters ----------