Skip to content

Commit b4d1943

Browse files
committed
DOC: added a reference to DataFrame assign in concatenate section of merging
Because of various stack overflow answers we are directed to the merging page where a link to DataFrame.assign would be better. Adding the reference here will make people's code better. At least it would have for me.
1 parent fdba133 commit b4d1943

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

doc/source/merging.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,8 @@ Concatenating with mixed ndims
310310

311311
You can concatenate a mix of Series and DataFrames. The
312312
Series will be transformed to DataFrames with the column name as
313-
the name of the Series.
313+
the name of the Series. To concatenate only one Series it is preferable
314+
to use the DataFrame method :meth:`~pandas.DataFrame.assign`.
314315

315316
.. ipython:: python
316317

doc/source/whatsnew/v0.21.1.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Performance Improvements
4848
Documentation Changes
4949
~~~~~~~~~~~~~~~~~~~~~
5050

51-
-
51+
- Added a reference to :func:`DataFrame.assign` in the concatenate section of the merging documentation (:issue:`18665`)
5252
-
5353
-
5454

0 commit comments

Comments
 (0)