MCPcopy
hub / github.com/pandas-dev/pandas / _inplace_method

Method _inplace_method

pandas/core/generic.py:12312–12321  ·  view source on GitHub ↗

Wrap arithmetic method to operate inplace.

(self, other, op)

Source from the content-addressed store, hash-verified

12310
12311 @final
12312 def _inplace_method(self, other, op) -> Self:
12313 """
12314 Wrap arithmetic method to operate inplace.
12315 """
12316 result = op(self, other)
12317
12318 # this makes sure that we are aligned like the input
12319 # we are updating inplace
12320 self._update_inplace(result.reindex_like(self))
12321 return self
12322
12323 @final
12324 def __iadd__(self, other) -> Self:

Callers 10

__iadd__Method · 0.95
__isub__Method · 0.95
__imul__Method · 0.95
__itruediv__Method · 0.95
__ifloordiv__Method · 0.95
__imod__Method · 0.95
__ipow__Method · 0.95
__iand__Method · 0.95
__ior__Method · 0.95
__ixor__Method · 0.95

Calls 3

_update_inplaceMethod · 0.95
opFunction · 0.85
reindex_likeMethod · 0.80

Tested by

no test coverage detected