def _convert_scalar_indexer(self, key, kind=None):
assert kind in ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', None]<EOL>if is_scalar(key):<EOL><INDENT>is_int = is_integer(key)<EOL>is_flt = is_float(key)<EOL>if kind in ['<STR_LIT>'] and (is_int or is_flt):<EOL><INDENT>self._invalid_indexer('<STR_LIT:index>', key)<EOL><DEDENT>elif kind in ['<STR_LIT>', '<STR_LIT>'] and is_flt:<EOL><INDENT>self._invalid_indexer('<STR_LIT:index>', key)<EOL><DEDENT><DEDENT>return super()._convert_scalar_indexer(key, kind=kind)<EOL>
We don't allow integer or float indexing on datetime-like when using
loc.

Parameters
----------
key : label of the slice bound
kind : {'ix', 'loc', 'getitem', 'iloc'} or None