class_docstr: String methods for pandas-on-Spark Series
class_docstr_tok: ["String","methods","for","pandas-on-Spark","Series"]
docstr: Determine if each string matches a regular expression.
  
  Analogous to :func:`contains`, but more strict, relying on
  :func:`re.match` instead of :func:`re.search`.
  
  Parameters
  ----------
  pat : str
      Character sequence or regular expression.
  case : bool, default True
      If True, case sensitive.
  flags : int, default 0 (no flags)
      Flags to pass through to the re module, e.g. re.IGNORECASE.
  na : default NaN
      Fill value for missing values.
  
  Returns
  -------
  Series of boolean values or object
      A Series of boolean values indicating whether the given pattern can
      be matched in the string of each element of the Series.
  
  Examples
  --------
  >>> s = ps.Series(['Mouse', 'dog', 'house and parrot', '23', np.NaN])
  >>> s.str.match('dog')
  0    False
  1     True
  2    False
  3    False
  4     None
  dtype: object
  
  >>> s.str.match('mouse|dog', case=False)
  0     True
  1     True
  2    False
  3    False
  4     None
  dtype: object
  
  >>> s.str.match('.+and.+', na=True)
  0    False
  1    False
  2     True
  3    False
  4     True
  dtype: bool
  
  >>> import re
  >>> s.str.match('MOUSE', flags=re.IGNORECASE)
  0     True
  1    False
  2    False
  3    False
  4     None
  dtype: object
code: def match(
      self,
      pat: str,
      case: bool = True,
      flags: int = 0,
      na: Any = np.NaN,
  ) -> "ps.Series":
      """
      Determine if each string matches a regular expression.
  
      Analogous to :func:`contains`, but more strict, relying on
      :func:`re.match` instead of :func:`re.search`.
  
      Parameters
      ----------
      pat : str
          Character sequence or regular expression.
      case : bool, default True
          If True, case sensitive.
      flags : int, default 0 (no flags)
          Flags to pass through to the re module, e.g. re.IGNORECASE.
      na : default NaN
          Fill value for missing values.
  
      Returns
      -------
      Series of boolean values or object
          A Series of boolean values indicating whether the given pattern can
          be matched in the string of each element of the Series.
  
      Examples
      --------
      >>> s = ps.Series(['Mouse', 'dog', 'house and parrot', '23', np.NaN])
      >>> s.str.match('dog')
      0    False
      1     True
      2    False
      3    False
      4     None
      dtype: object
  
      >>> s.str.match('mouse|dog', case=False)
      0     True
      1     True
      2    False
      3    False
      4     None
      dtype: object
  
      >>> s.str.match('.+and.+', na=True)
      0    False
      1    False
      2     True
      3    False
      4     True
      dtype: bool
  
      >>> import re
      >>> s.str.match('MOUSE', flags=re.IGNORECASE)
      0     True
      1    False
      2    False
      3    False
      4     None
      dtype: object
      """
  
      def pandas_match(s) -> ps.Series[bool]:  # type: ignore[no-untyped-def]
          return s.str.match(pat, case, flags, na)
  
      return self._data.pandas_on_spark.transform_batch(pandas_match)
  
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 36 for calling the StringMethods obj's underlying member method code with example usage: obj.match(pat, case, flags, na) and returns: self, s