From 1aded6765e0f2bf2b20993b18cec00c4c13f6a00 Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Mon, 23 Oct 2017 08:16:16 -0500 Subject: [PATCH 1/2] DOC: Document return type from concat For a single Series. Closes https://github.com/pandas-dev/pandas/issues/17952 --- pandas/core/reshape/concat.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandas/core/reshape/concat.py b/pandas/core/reshape/concat.py index c54763f8ebde1..6ab4b5e9563c6 100644 --- a/pandas/core/reshape/concat.py +++ b/pandas/core/reshape/concat.py @@ -66,6 +66,9 @@ def concat(objs, axis=0, join='outer', join_axes=None, ignore_index=False, Returns ------- concatenated : object, type of objs + When concatenating all ``Series`` along the index, a ``Series`` is + returned. When ``objs`` includes at least one ``DataFrame`` or when + concatenating along the columns, a ``DataFrame`` is returned. Notes ----- From 00e3d1dc9a5ae91d6fcd2f659e143389f99009f0 Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Mon, 23 Oct 2017 09:28:09 -0500 Subject: [PATCH 2/2] Reword --- pandas/core/reshape/concat.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pandas/core/reshape/concat.py b/pandas/core/reshape/concat.py index 6ab4b5e9563c6..1822449263cac 100644 --- a/pandas/core/reshape/concat.py +++ b/pandas/core/reshape/concat.py @@ -66,9 +66,10 @@ def concat(objs, axis=0, join='outer', join_axes=None, ignore_index=False, Returns ------- concatenated : object, type of objs - When concatenating all ``Series`` along the index, a ``Series`` is - returned. When ``objs`` includes at least one ``DataFrame`` or when - concatenating along the columns, a ``DataFrame`` is returned. + When concatenating all ``Series`` along the index (axis=0), a + ``Series`` is returned. When ``objs`` contains at least one + ``DataFrame``, a ``DataFrame`` is returned. When concatenating along + the columns (axis=1), a ``DataFrame`` is returned. Notes -----