Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion pandas/core/ops/docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def make_flex_doc(op_name: str, typ: str) -> str:

Parameters
----------
other : Series or scalar value
other : Series or scalar value (that can be the element of a Series)
The second operand in this operation.
level : int or name
Broadcast across a level, matching Index values on the
Expand Down
6 changes: 3 additions & 3 deletions pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -6072,7 +6072,7 @@ def eq(

Parameters
----------
other : Series or scalar value
other : Series or scalar value (that can be the element of a Series)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parentheses added here do not help the issue since any Python object can be an element of a Series (even a Series itself can be an element of a Series!). We want to indicate that this method treats lists, tuples, ndarrays, and Series differently from any other Python object. Namely, these types will be evaluated element-by-element whereas every other Python object will be evaluated as a whole against each element of the caller.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

288f06e does it look better?

The second operand in this operation.
level : int or name
Broadcast across a level, matching Index values on the
Expand Down Expand Up @@ -6141,7 +6141,7 @@ def le(self, other, level=None, fill_value=None, axis: Axis = 0) -> Series:

Parameters
----------
other : Series or scalar value
other : Series or scalar value (that can be the element of a Series)
The second operand in this operation.
level : int or name
Broadcast across a level, matching Index values on the
Expand Down Expand Up @@ -6213,7 +6213,7 @@ def ge(self, other, level=None, fill_value=None, axis: Axis = 0) -> Series:

Parameters
----------
other : Series or scalar value
other : Series or scalar value (that can be the element of a Series)
The second operand in this operation.
level : int or name
Broadcast across a level, matching Index values on the
Expand Down
Loading