itholic opened a new pull request #34113:
URL: https://github.com/apache/spark/pull/34113


   ### What changes were proposed in this pull request?
   This PR proposes implementing `MultiIndex.equal_levels`.
   
   ```python
   >>> psmidx1 = ps.MultiIndex.from_tuples([("a", "x"), ("b", "y"), ("c", "z")])
   >>> psmidx2 = ps.MultiIndex.from_tuples([("b", "y"), ("a", "x"), ("c", "z")])
   >>> psmidx1.equal_levels(psmidx2)
   True
   
   >>> psmidx1 = ps.MultiIndex.from_tuples([("a", "x"), ("b", "y"), ("c", "z"), 
("a", "y")])
   >>> psmidx2 = ps.MultiIndex.from_tuples([("a", "y"), ("b", "x"), ("c", "z"), 
("c", "x")])
   >>> psmidx1.equal_levels(psmidx2)
   True
   ```
   
   This was originally proposed in 
https://github.com/databricks/koalas/pull/1789, and all reviews in origin PR 
has been resolved.
   
   ### Why are the changes needed?
   
   We should support the pandas API as much as possible for pandas-on-Spark 
module.
   
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes, the `MultiIndex.equal_levels` API is available.
   
   
   ### How was this patch tested?
   
   Unittests
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to