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

Method _wrap_setop_result

pandas/core/indexes/base.py:3233–3240  ·  view source on GitHub ↗
(self, other: Index, result)

Source from the content-addressed store, hash-verified

3231
3232 @final
3233 def _wrap_setop_result(self, other: Index, result) -> Index:
3234 name = get_op_result_name(self, other)
3235 if isinstance(result, Index):
3236 if result.name != name:
3237 result = result.rename(name)
3238 else:
3239 result = self._shallow_copy(result, name=name)
3240 return result
3241
3242 @final
3243 def intersection(self, other, sort: bool = False):

Callers 5

unionMethod · 0.95
_wrap_range_setopMethod · 0.80
_intersectionMethod · 0.80

Calls 3

_shallow_copyMethod · 0.95
get_op_result_nameFunction · 0.90
renameMethod · 0.45

Tested by

no test coverage detected