Skip to content

Commit 2ab60a2

Browse files
jbrockmendelgaluhsahid
authored andcommitted
CLN: Remove incorrect check, comment, rename (pandas-dev#27922)
1 parent c5e9d1b commit 2ab60a2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pandas/core/ops/__init__.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -730,9 +730,12 @@ def wrapper(self, other, axis=None):
730730
)
731731

732732
result = self._constructor(res_values, index=self.index)
733-
# rename is needed in case res_name is None and result.name
734-
# is not.
735-
return finalizer(result).rename(res_name)
733+
result = finalizer(result)
734+
735+
# Set the result's name after finalizer is called because finalizer
736+
# would set it back to self.name
737+
result.name = res_name
738+
return result
736739

737740
wrapper.__name__ = op_name
738741
return wrapper

0 commit comments

Comments
 (0)