concat sorts columns without preserving order #9001
Labels
API Design
Bug
Duplicate Report
Duplicate issue or pull request
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
Milestone
Although it's my desired behavior, I realize perhaps this is not the desired behavior, but I think it's reasonable to bring up.
If I want to concat two data frames and their column names are the same, the order is preserved:
However, if they are not, it seems they are sorted:
Would it be reasonable to try to preserve the order? So the output would be:
I realize that, in an ordered list,
"A"
doesn't come before"1"
or"2"
, but in bothdf1
anddf2
,"A"
does come before"1"
and"2"
.The text was updated successfully, but these errors were encountered: