Skip to content

Commit 87f5654

Browse files
Robin Kiplang'atjorisvandenbossche
Robin Kiplang'at
authored andcommitted
DOC: fix the pandas.DataFrame.add example (#20077)
1 parent 38afa93 commit 87f5654

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

pandas/core/ops.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -345,16 +345,16 @@ def _get_op_name(op, special):
345345

346346
_add_example_FRAME = """
347347
>>> a = pd.DataFrame([1, 1, 1, np.nan], index=['a', 'b', 'c', 'd'],
348-
columns=['one'])
348+
... columns=['one'])
349349
>>> a
350350
one
351351
a 1.0
352352
b 1.0
353353
c 1.0
354354
d NaN
355355
>>> b = pd.DataFrame(dict(one=[1, np.nan, 1, np.nan],
356-
two=[np.nan, 2, np.nan, 2]),
357-
index=['a', 'b', 'd', 'e'])
356+
... two=[np.nan, 2, np.nan, 2]),
357+
... index=['a', 'b', 'd', 'e'])
358358
>>> b
359359
one two
360360
a 1.0 NaN
@@ -520,16 +520,16 @@ def _get_op_name(op, special):
520520
Examples
521521
--------
522522
>>> a = pd.DataFrame([1, 1, 1, np.nan], index=['a', 'b', 'c', 'd'],
523-
columns=['one'])
523+
... columns=['one'])
524524
>>> a
525525
one
526526
a 1.0
527527
b 1.0
528528
c 1.0
529529
d NaN
530530
>>> b = pd.DataFrame(dict(one=[1, np.nan, 1, np.nan],
531-
two=[np.nan, 2, np.nan, 2]),
532-
index=['a', 'b', 'd', 'e'])
531+
... two=[np.nan, 2, np.nan, 2]),
532+
... index=['a', 'b', 'd', 'e'])
533533
>>> b
534534
one two
535535
a 1.0 NaN
@@ -556,14 +556,14 @@ def _get_op_name(op, special):
556556
other : Series, DataFrame, or constant
557557
axis : {{0, 1, 'index', 'columns'}}
558558
For Series input, axis to match Series index on
559+
level : int or name
560+
Broadcast across a level, matching Index values on the
561+
passed MultiIndex level
559562
fill_value : None or float value, default None
560563
Fill existing missing (NaN) values, and any new element needed for
561564
successful DataFrame alignment, with this value before computation.
562565
If data in both corresponding DataFrame locations is missing
563566
the result will be missing
564-
level : int or name
565-
Broadcast across a level, matching Index values on the
566-
passed MultiIndex level
567567
568568
Notes
569569
-----

0 commit comments

Comments
 (0)