def _validate_indexer(self, form, key, kind):
        assert kind in ['ix', 'loc', 'getitem', 'iloc']

        if key is None:
            pass
        elif is_integer(key):
            pass
        elif kind in ['iloc', 'getitem']:
            self._invalid_indexer(form, key)
        return key
if we are positional indexer
dataset/ETHPy150Open pydata/pandas/pandas/indexes/base.py/Index._validate_indexer