Skip to content

"Concatenation will no longer sort" wording is very inconsistent #21112

Closed
@quant5

Description

@quant5

The 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

https://github.com/pandas-dev/pandas/blob/c4da79b5b322c73d8e61d1cb98ac4ab1e2438b40/pandas/core/indexes/api.py

It needs to be clearer that current default is still sort=True but will revert to sort=False in a future version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions