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

Method __getitem__

pandas/core/indexing.py:2518–2527  ·  view source on GitHub ↗
(self, key)

Source from the content-addressed store, hash-verified

2516 raise AbstractMethodError(self)
2517
2518 def __getitem__(self, key):
2519 if not isinstance(key, tuple):
2520 # we could have a convertible item here (e.g. Timestamp)
2521 if not is_list_like_indexer(key):
2522 key = (key,)
2523 else:
2524 raise ValueError("Invalid call for scalar access (getting)!")
2525
2526 key = self._convert_key(key)
2527 return self.obj._get_value(*key, takeable=self._takeable)
2528
2529 def __setitem__(self, key, value) -> None:
2530 if isinstance(key, tuple):

Callers

nothing calls this directly

Calls 3

_convert_keyMethod · 0.95
is_list_like_indexerFunction · 0.90
_get_valueMethod · 0.45

Tested by

no test coverage detected