def str_find(arr, sub, start=0, end=None, side='left'):
 if (not isinstance(sub, compat.string_types)):
  msg = 'expected a string object, not {0}'
  raise TypeError(msg.format(type(sub).__name__))
 if (side == 'left'):
  method = 'find'
 elif (side == 'right'):
  method = 'rfind'
 else:
  raise ValueError('Invalid side')
 if (end is None):
  f = (lambda x: getattr(x, method)(sub, start))
 else:
  f = (lambda x: getattr(x, method)(sub, start, end))
 return _na_map(f, arr, dtype=int)

def str_find ( arr , sub , start = 0 , end = None , side = 'left' ) : if ( not isinstance ( sub , compat . string_types ) ) : msg = 'expected a string object, not {0}' raise TypeError ( msg . format ( type ( sub ) . __name__ ) ) if ( side == 'left' ) : method = 'find' elif ( side == 'right' ) : method = 'rfind' else : raise ValueError ( 'Invalid side' ) if ( end is None ) : f = ( lambda x : getattr ( x , method ) ( sub , start ) ) else : f = ( lambda x : getattr ( x , method ) ( sub , start , end ) ) return _na_map ( f , arr , dtype = int )
return indexes in each strings in the series/index where the substring is fully contained between [start:end] .