Skip to content

DOC: Change warning for sort behavior in concat #37948

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

Merged
merged 3 commits into from
Nov 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions doc/source/user_guide/merging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ behavior:
},
index=[2, 3, 6, 7],
)
result = pd.concat([df1, df4], axis=1, sort=False)
result = pd.concat([df1, df4], axis=1)


.. ipython:: python
Expand All @@ -204,13 +204,6 @@ behavior:
p.plot([df1, df4], result, labels=["df1", "df4"], vertical=False);
plt.close("all");

.. warning::

The default behavior with ``join='outer'`` is to sort the other axis
(columns in this case). In a future version of pandas, the default will
be to not sort. We specified ``sort=False`` to opt in to the new
behavior now.

Here is the same thing with ``join='inner'``:

.. ipython:: python
Expand Down