-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
changing order of keys? #24730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
cc @jreback |
inner does look a bit odd, it could be sorting. we do have a
@epierson9 welcome for a deeper look. |
Is it the same issue as #18776 ? |
@ischurov : Good question! It looks related. |
Does Pandas have a policy on noting long-standing bugs like this one in the docs? It would save a slight amount of developer anguish to know that a workaround is needed from the start! However, remembering to remove any "known bug" references in documentation would be quite an overhead, so I'd guess that it's probably avoided. |
Code Sample, a copy-pastable example if possible
Problem description
Based on the pandas documentation, I was expecting the order of the keys in the left dataframe (x) to be preserved in both cases. The documentation says:
left: use only keys from left frame, similar to a SQL left outer join; preserve key order
inner: use intersection of keys from both frames, similar to a SQL inner join; preserve the order of the left keys
Instead, the output is:
Is this intended behavior? If so, the documentation seems a bit confusing?
The text was updated successfully, but these errors were encountered: