Skip to content

Commit 354026a

Browse files
author
Nick Eubank
committed
moved docs to 0.17
1 parent eab0553 commit 354026a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

doc/source/whatsnew/v0.17.0.txt

+7
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ Check the :ref:`API Changes <whatsnew_0170.api>` and :ref:`deprecations <whatsne
2020

2121
New features
2222
~~~~~~~~~~~~
23+
- ``merge`` now accepts the argument ``indicator``. If ``True``, adds a column to output DataFrame called ``_merge`` with information on the source of each row. ``_merge`` is Categorical-type and takes on a value of ``left_only`` for observations whose merge key only appears in ``'left'`` DataFrame, ``right_only`` for observations whose merge key only appears in ``'right'`` DataFrame, and ``both`` if the observation's merge key is found in both. (:issue:`7412` and :issue:`8790`.)
24+
25+
.. ipython:: python
26+
27+
df1 = pd.DataFrame({'col1':[0,1], 'col_left':['a','b']})
28+
df2 = pd.DataFrame({'col1':[1,2,2],'col_right':[2,2,2]})
29+
pd.merge(df1, df2, on='col1', how='outer', indicator=True)
2330

2431
.. _whatsnew_0170.enhancements.other:
2532

0 commit comments

Comments
 (0)