Skip to content

Commit

Permalink
always return left index name
Browse files Browse the repository at this point in the history
  • Loading branch information
eshirvana committed Nov 9, 2023
1 parent d2270d2 commit 9437197
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions pandas/core/ops/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,7 @@ def get_op_result_name(left, right):
name : object
Usually a string
"""
name = (
_maybe_match_name(left, right)
if isinstance(right, (ABCSeries, ABCIndex))
else left.name
)
return name if name is not None else left.name
return left.name


def _maybe_match_name(a, b):
Expand Down

0 comments on commit 9437197

Please sign in to comment.