diff --git a/pandas/core/computation/ops.py b/pandas/core/computation/ops.py index 3a556b57ea5a5..cd5096f405770 100644 --- a/pandas/core/computation/ops.py +++ b/pandas/core/computation/ops.py @@ -555,6 +555,7 @@ class UnaryOp(Op): def __init__(self, op: str, operand) -> None: super().__init__(op, (operand,)) self.operand = operand + self.value = operand try: self.func = _unary_ops_dict[op]