Skip to content

DOC: Additions/updates to documentation-GH46359 #47877

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 28, 2022
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