"Concatenation will no longer sort" wording is very inconsistent
See original GitHub issueThe wording in the update docs is (emphasis added):
In a future version of pandas pandas.concat() will no longer sort the non-concatenation axis when it is not already aligned. (…)
To keep the previous behavior (sorting) and silence the warning, pass sort=True.
To accept the future behavior (no sorting), pass sort=False
https://pandas-docs.github.io/pandas-docs-travis/whatsnew.html#concatenation-will-no-longer-sort
But the wording in the FutureWarning messages is (emphasis added):
Sorting because non-concatenation axis is not aligned. A future version of pandas will change to not sort by default.
To accept the future behavior, pass sort=True.
To retain the current behavior and silence the warning, pass sort=False
It needs to be clearer that current default is still sort=True but will revert to sort=False in a future version.
Issue Analytics
- State:
- Created 5 years ago
- Comments:15 (7 by maintainers)
Top Results From Across the Web
Problem with concatenated data...won't sort - Excel Help Forum
I have two columns of numbers (A and B). Each column is in text format. I inserted another column (C) and, in it,...
Read more >Why does the concatenation order change with a User ...
The order changes because the order of the tables involved in the cross join has changed. In one plan @ValueTable is the outer...
Read more >tsql - Concatenating SQL Server VARCHAR(N), results with ...
From your answers it seems that SQL Server string concatenation operator (+) simply does not implicitly convert [n]varchar(n) -> [n]varchar(max) ...
Read more >Dimensions of matrices being concatenated are not consistent.
g = readmatrix('Data2.txt'); %A much more meaningfull variable name than g would be a very good idea!
Read more >Breaking change in v4.4: Aggregate with Concatenate and ...
Such behavior was inconsistent and sometimes required additional sorting prior to aggregation. The new version changes the concatenation ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Ok, I found it. It actually was an append command (not concat or merge). Adding the sort parameter did remove the warning. I added the sort=False parameter to this:
df_B = df_A.append(df_B, verify_integrity=True, sort=False).copy()also: Currently the warning doesn’t get silenced if you pass “sort=False” (i.e. the true future default behavior)–presumably there should be no warning as long as the sort parameter is explicitly set (passed).