BUG: Joining data frames with MultiIndex results in non-deterministic level order. #36910
Closed
2 of 3 tasks
Labels
Milestone
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Expected Output
Something deterministic
Produced Output
When running the code multiple times (restart the python interpreter), the output switches (apparently randomly) between these two outputs:
Problem description
When joining with a data frame with a MultiIndex, the order of the levels in the resulting data frame is non-deterministic. This is very surprising, and resulted in a hard-to-debug issue in my code. This issue happens with both inner joins and left joins.
Possibly related issues: #36909, #25760
Past discussion on non-determinism in pandas: #32514, #32449, #12679
Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: