#NEWLINE# def _convert_for_reindex( self , key , axis = 0 ) : #NEWLINE# #INDENT# labels = self . obj . _get_axis ( axis ) #NEWLINE# if is_bool_indexer ( key ) : #NEWLINE# #INDENT# key = check_bool_indexer ( labels , key ) #NEWLINE# return labels [ key ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( key , Index ) : #NEWLINE# #INDENT# keyarr = key #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# keyarr = _asarray_tuplesafe ( axis ) #NEWLINE# #UNINDENT# if ( is_integer_dtype ( keyarr ) and ( not labels . is_integer ( ) ) ) : #NEWLINE# #INDENT# keyarr = com . _ensure_platform_int ( keyarr ) #NEWLINE# return labels . take ( keyarr ) #NEWLINE# #UNINDENT# return keyarr