diff --git a/pandas/core/ops/__init__.py b/pandas/core/ops/__init__.py index 0de28f0a4a8b3..7e03b9544ee72 100644 --- a/pandas/core/ops/__init__.py +++ b/pandas/core/ops/__init__.py @@ -730,9 +730,12 @@ def wrapper(self, other, axis=None): ) result = self._constructor(res_values, index=self.index) - # rename is needed in case res_name is None and result.name - # is not. - return finalizer(result).rename(res_name) + result = finalizer(result) + + # Set the result's name after finalizer is called because finalizer + # would set it back to self.name + result.name = res_name + return result wrapper.__name__ = op_name return wrapper