def str_extract(arr, pat, flags=0, expand=None):
 if (expand is None):
  warnings.warn(((('currently extract(expand=None) ' + 'means expand=False (return Index/Series/DataFrame) ') + 'but in a future version of pandas this will be changed ') + 'to expand=True (return DataFrame)'), FutureWarning, stacklevel=3)
  expand = False
 if (not isinstance(expand, bool)):
  raise ValueError('expand must be True or False')
 if expand:
  return _str_extract_frame(arr._orig, pat, flags=flags)
 else:
  (result, name) = _str_extract_noexpand(arr._data, pat, flags=flags)
  return arr._wrap_result(result, name=name, expand=expand)

def str_extract ( arr , pat , flags = 0 , expand = None ) : if ( expand is None ) : warnings . warn ( ( ( ( 'currently extract(expand=None) ' + 'means expand=False (return Index/Series/DataFrame) ' ) + 'but in a future version of pandas this will be changed ' ) + 'to expand=True (return DataFrame)' ) , FutureWarning , stacklevel = 3 ) expand = False if ( not isinstance ( expand , bool ) ) : raise ValueError ( 'expand must be True or False' ) if expand : return _str_extract_frame ( arr . _orig , pat , flags = flags ) else : ( result , name ) = _str_extract_noexpand ( arr . _data , pat , flags = flags ) return arr . _wrap_result ( result , name = name , expand = expand )
for each subject string in the series .