Skip to content

Commit 8a71e83

Browse files
authored
DOC: Additions/updates to documentation-GH46359 (#47877)
1 parent 9a2276f commit 8a71e83

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

pandas/core/ops/docstrings.py

+15-1
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ def make_flex_doc(op_name: str, typ: str) -> str:
461461
462462
Parameters
463463
----------
464-
other : scalar, sequence, Series, or DataFrame
464+
other : scalar, sequence, Series, dict or DataFrame
465465
Any single or multiple element data structure, or list-like object.
466466
axis : {{0 or 'index', 1 or 'columns'}}
467467
Whether to compare by the index (0 or 'index') or columns.
@@ -556,6 +556,20 @@ def make_flex_doc(op_name: str, typ: str) -> str:
556556
triangle 2 179
557557
rectangle 3 359
558558
559+
Multiply a dictionary by axis.
560+
561+
>>> df.mul({{'angles': 0, 'degrees': 2}})
562+
angles degrees
563+
circle 0 720
564+
triangle 0 360
565+
rectangle 0 720
566+
567+
>>> df.mul({{'circle': 0, 'triangle': 2, 'rectangle': 3}}, axis='index')
568+
angles degrees
569+
circle 0 0
570+
triangle 6 360
571+
rectangle 12 1080
572+
559573
Multiply a DataFrame of different shape with operator version.
560574
561575
>>> other = pd.DataFrame({{'angles': [0, 3, 4]}},

0 commit comments

Comments
 (0)