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

Method _validate_indexer

pandas/core/indexes/base.py:6853–6864  ·  view source on GitHub ↗

If we are positional indexer, validate that we have appropriate typed bounds must be an integer.

(
        self,
        form: Literal["positional", "slice"],
        key,
        kind: Literal["getitem", "iloc"],
    )

Source from the content-addressed store, hash-verified

6851
6852 @final
6853 def _validate_indexer(
6854 self,
6855 form: Literal["positional", "slice"],
6856 key,
6857 kind: Literal["getitem", "iloc"],
6858 ) -> None:
6859 """
6860 If we are positional indexer, validate that we have appropriate
6861 typed bounds must be an integer.
6862 """
6863 if not lib.is_int_or_none(key):
6864 self._raise_invalid_indexer(form, key)
6865
6866 def _maybe_cast_slice_bound(self, label, side: str_t):
6867 """

Callers 2

Calls 1

Tested by

no test coverage detected