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

Method _multi_take

pandas/core/indexing.py:1327–1348  ·  view source on GitHub ↗

Create the indexers for the passed tuple of keys, and executes the take operation. This allows the take operation to be executed all at once, rather than once for each dimension. Improving efficiency. Parameters ---------- tup : tuple

(self, tup: tuple)

Source from the content-addressed store, hash-verified

1325 return not any(com.is_bool_indexer(x) for x in tup)
1326
1327 def _multi_take(self, tup: tuple):
1328 """
1329 Create the indexers for the passed tuple of keys, and
1330 executes the take operation. This allows the take operation to be
1331 executed all at once, rather than once for each dimension.
1332 Improving efficiency.
1333
1334 Parameters
1335 ----------
1336 tup : tuple
1337 Tuple of indexers, one per axis.
1338
1339 Returns
1340 -------
1341 values: same type as the object being indexed
1342 """
1343 # GH 836
1344 d = {
1345 axis: self._get_listlike_indexer(key, axis)
1346 for (key, axis) in zip(tup, self.obj._AXIS_ORDERS, strict=True)
1347 }
1348 return self.obj._reindex_with_indexers(d, allow_dups=True)
1349
1350 # -------------------------------------------------------------------
1351

Callers 1

_getitem_tupleMethod · 0.95

Calls 2

_get_listlike_indexerMethod · 0.95

Tested by

no test coverage detected