Skip to content
Closed
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
4 changes: 2 additions & 2 deletions pandas/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4695,7 +4695,7 @@ def _maybe_update_attributes(self, attrs):
""" Update Index attributes (e.g. freq) depending on op """
return attrs

def _validate_for_numeric_unaryop(self, op, opstr):
def _validate_for_numeric_unaryop(self, opstr):
""" validate if we can perform a numeric unary operation """

if not self._is_numeric_dtype:
Expand Down Expand Up @@ -4776,7 +4776,7 @@ def _make_evaluate_unary(op, opstr):

def _evaluate_numeric_unary(self):

self._validate_for_numeric_unaryop(op, opstr)
self._validate_for_numeric_unaryop(opstr)
attrs = self._get_attributes_dict()
attrs = self._maybe_update_attributes(attrs)
return Index(op(self.values), **attrs)
Expand Down