Skip to content

Commit

Permalink
DOC: Improve docstring of Series.mul (pandas-dev#25136)
Browse files Browse the repository at this point in the history
  • Loading branch information
lordgrenville authored and Pingviinituutti committed Feb 28, 2019
1 parent c43de3a commit cb7da42
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions pandas/core/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,14 +459,15 @@ def _get_op_name(op, special):
Fill existing missing (NaN) values, and any new element needed for
successful Series alignment, with this value before computation.
If data in both corresponding Series locations is missing
the result will be missing
the result will be missing.
level : int or name
Broadcast across a level, matching Index values on the
passed MultiIndex level
passed MultiIndex level.
Returns
-------
result : Series
Series
The result of the operation.
See Also
--------
Expand Down Expand Up @@ -495,6 +496,27 @@ def _get_op_name(op, special):
d 1.0
e NaN
dtype: float64
>>> a.subtract(b, fill_value=0)
a 0.0
b 1.0
c 1.0
d -1.0
e NaN
dtype: float64
>>> a.multiply(b)
a 1.0
b NaN
c NaN
d NaN
e NaN
dtype: float64
>>> a.divide(b, fill_value=0)
a 1.0
b inf
c inf
d 0.0
e NaN
dtype: float64
"""

_arith_doc_FRAME = """
Expand Down

0 comments on commit cb7da42

Please sign in to comment.