Skip to content

Commit 57fdba5

Browse files
committed
Added a description to the examples.
1 parent 7c28463 commit 57fdba5

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

pandas/core/frame.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,11 @@
256256
4 bar 2 bar 6
257257
5 baz 3 baz 7
258258
259+
Merge DataFrames A and B. Specify the left and right suffix
260+
to append to the name of any overlapping columns.
261+
259262
>>> A.merge(B, left_on='lkey', right_on='rkey', how='outer',
260-
suffixes=('_left', '_right'))
263+
... suffixes=('_left', '_right'))
261264
lkey value_left rkey value_right
262265
0 foo 1 foo 5
263266
1 foo 1 foo 8
@@ -266,10 +269,13 @@
266269
4 bar 2 bar 6
267270
5 baz 3 baz 7
268271
272+
Merge DataFrames A and B, but throw an error if the DataFrames have
273+
any overlapping columns.
274+
269275
>>> A.merge(B, left_on='lkey', right_on='rkey', how='outer',
270-
suffixes=(False, False))
276+
... suffixes=(False, False))
271277
Traceback (most recent call last):
272-
...
278+
...
273279
ValueError: columns overlap but no suffix specified:
274280
Index(['value'], dtype='object')
275281
"""

0 commit comments

Comments
 (0)