Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion pandas/core/ops/docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ def make_flex_doc(op_name: str, typ: str) -> str:

Parameters
----------
other : scalar, sequence, Series, or DataFrame
other : scalar, sequence, Series, dict or DataFrame
Any single or multiple element data structure, or list-like object.
axis : {{0 or 'index', 1 or 'columns'}}
Whether to compare by the index (0 or 'index') or columns.
Expand Down Expand Up @@ -556,6 +556,20 @@ def make_flex_doc(op_name: str, typ: str) -> str:
triangle 2 179
rectangle 3 359

Multiply a dictionary by axis.

>>> df.mul({{'angles': 0, 'degrees': 2}})
angles degrees
circle 0 720
triangle 0 360
rectangle 0 720

>>> df.mul({{'circle': 0, 'triangle': 2, 'rectangle': 3}}, axis='index')
angles degrees
circle 0 0
triangle 6 360
rectangle 12 1080

Multiply a DataFrame of different shape with operator version.

>>> other = pd.DataFrame({{'angles': [0, 3, 4]}},
Expand Down