#NEWLINE# def _has_valid_type( self , key , axis ) : #NEWLINE# #INDENT# if is_bool_indexer ( key ) : #NEWLINE# #INDENT# if ( hasattr ( key , 'index' ) and isinstance ( key . index , Index ) ) : #NEWLINE# #INDENT# if ( key . index . inferred_type == 'integer' ) : #NEWLINE# #INDENT# raise NotImplementedError ( 'iLocation based boolean indexing on an integer type is not available' ) #NEWLINE# #UNINDENT# raise ValueError ( 'iLocation based boolean indexing cannot use an indexable as a mask' ) #NEWLINE# #UNINDENT# return True #NEWLINE# #UNINDENT# if isinstance ( key , slice ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if is_integer ( key ) : #NEWLINE# #INDENT# return self . _is_valid_integer ( key , self ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if is_list_like_indexer ( key ) : #NEWLINE# #INDENT# return self . _is_valid_list_like ( key , axis ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return False