From 84b47b65152c81bcf66b78aafb691a57af59cec0 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sat, 2 Jan 2021 17:27:06 -0600 Subject: [PATCH 1/2] DOC: how to revert MultiIndex.to_flat_index --- pandas/core/indexes/multi.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandas/core/indexes/multi.py b/pandas/core/indexes/multi.py index c80dadcc42022..51f15136cfc15 100644 --- a/pandas/core/indexes/multi.py +++ b/pandas/core/indexes/multi.py @@ -1792,6 +1792,10 @@ def to_flat_index(self): This method will simply return the caller if called by anything other than a MultiIndex. + See Also + -------- + MultiIndex.from_tuples : Convert flat index back to MultiIndex + Examples -------- >>> index = pd.MultiIndex.from_product( From f2ec3448fb08d255edd6ae33177dec5dc35268d1 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sat, 2 Jan 2021 20:48:17 -0600 Subject: [PATCH 2/2] CI fixes --- pandas/core/indexes/multi.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandas/core/indexes/multi.py b/pandas/core/indexes/multi.py index 51f15136cfc15..ad10b41093f27 100644 --- a/pandas/core/indexes/multi.py +++ b/pandas/core/indexes/multi.py @@ -1787,15 +1787,15 @@ def to_flat_index(self): pd.Index Index with the MultiIndex data represented in Tuples. + See Also + -------- + MultiIndex.from_tuples : Convert flat index back to MultiIndex. + Notes ----- This method will simply return the caller if called by anything other than a MultiIndex. - See Also - -------- - MultiIndex.from_tuples : Convert flat index back to MultiIndex - Examples -------- >>> index = pd.MultiIndex.from_product(