class_docstr: String methods for pandas-on-Spark Series
class_docstr_tok: ["String","methods","for","pandas-on-Spark","Series"]
docstr: Find all occurrences of pattern or regular expression in the Series.
  
  Equivalent to applying :func:`re.findall` to all the elements in
  the Series.
  
  Parameters
  ----------
  pat : str
      Pattern or regular expression.
  flags : int, default 0 (no flags)
      `re` module flags, e.g. `re.IGNORECASE`.
  
  Returns
  -------
  Series of object
      All non-overlapping matches of pattern or regular expression in
      each string of this Series.
  
  Examples
  --------
  >>> s = ps.Series(['Lion', 'Monkey', 'Rabbit'])
  
  The search for the pattern ‘Monkey’ returns one match:
  
  >>> s.str.findall('Monkey')
  0          []
  1    [Monkey]
  2          []
  dtype: object
  
  On the other hand, the search for the pattern ‘MONKEY’ doesn’t return
  any match:
  
  >>> s.str.findall('MONKEY')
  0    []
  1    []
  2    []
  dtype: object
  
  Flags can be added to the pattern or regular expression. For instance,
  to find the pattern ‘MONKEY’ ignoring the case:
  
  >>> import re
  >>> s.str.findall('MONKEY', flags=re.IGNORECASE)
  0          []
  1    [Monkey]
  2          []
  dtype: object
  
  When the pattern matches more than one string in the Series, all
  matches are returned:
  
  >>> s.str.findall('on')
  0    [on]
  1    [on]
  2      []
  dtype: object
  
  Regular expressions are supported too. For instance, the search for all
  the strings ending with the word ‘on’ is shown next:
  
  >>> s.str.findall('on$')
  0    [on]
  1      []
  2      []
  dtype: object
  
  If the pattern is found more than once in the same string, then a list
  of multiple strings is returned:
  
  >>> s.str.findall('b')
  0        []
  1        []
  2    [b, b]
  dtype: object
code: def findall(self, pat: str, flags: int = 0) -> "ps.Series":
      """
      Find all occurrences of pattern or regular expression in the Series.
  
      Equivalent to applying :func:`re.findall` to all the elements in
      the Series.
  
      Parameters
      ----------
      pat : str
          Pattern or regular expression.
      flags : int, default 0 (no flags)
          `re` module flags, e.g. `re.IGNORECASE`.
  
      Returns
      -------
      Series of object
          All non-overlapping matches of pattern or regular expression in
          each string of this Series.
  
      Examples
      --------
      >>> s = ps.Series(['Lion', 'Monkey', 'Rabbit'])
  
      The search for the pattern ‘Monkey’ returns one match:
  
      >>> s.str.findall('Monkey')
      0          []
      1    [Monkey]
      2          []
      dtype: object
  
      On the other hand, the search for the pattern ‘MONKEY’ doesn’t return
      any match:
  
      >>> s.str.findall('MONKEY')
      0    []
      1    []
      2    []
      dtype: object
  
      Flags can be added to the pattern or regular expression. For instance,
      to find the pattern ‘MONKEY’ ignoring the case:
  
      >>> import re
      >>> s.str.findall('MONKEY', flags=re.IGNORECASE)
      0          []
      1    [Monkey]
      2          []
      dtype: object
  
      When the pattern matches more than one string in the Series, all
      matches are returned:
  
      >>> s.str.findall('on')
      0    [on]
      1    [on]
      2      []
      dtype: object
  
      Regular expressions are supported too. For instance, the search for all
      the strings ending with the word ‘on’ is shown next:
  
      >>> s.str.findall('on$')
      0    [on]
      1      []
      2      []
      dtype: object
  
      If the pattern is found more than once in the same string, then a list
      of multiple strings is returned:
  
      >>> s.str.findall('b')
      0        []
      1        []
      2    [b, b]
      dtype: object
      """
  
      # type hint does not support to specify array type yet.
      @pandas_udf(  # type: ignore[call-overload]
          returnType=ArrayType(StringType(), containsNull=True)
      )
      def pudf(s: pd.Series) -> pd.Series:
          return s.str.findall(pat, flags)
  
      return self._data._with_new_scol(
          scol=pudf(self._data.spark.column)
      )
  
imports: from typing import Any, Callable, Dict, List, Optional, Union, cast, no_type_check
  import numpy
  import pandas
  from pyspark.sql.types import StringType, BinaryType, ArrayType, LongType, MapType
  from pyspark.sql import functions
  from pyspark.sql.functions import pandas_udf
  import pyspark.pandas
label_desc: Use image node_id 31 for calling the StringMethods obj's underlying member method code with example usage: obj.findall(pat, flags) and returns: self, s