class_docstr: Wrapper class for interacting with per-group state data in `applyInPandasWithState`.
docstr: Update the value of the state. The value of the state cannot be null.
docstr_tok: ["Update","the","value","of","the","state",".","The","value","of","the","state","can","not","be","null","."]
code: def update(self, newValue: Tuple) -> None:
      """
      Update the value of the state. The value of the state cannot be null.
      """
      if newValue is None:
          raise PySparkTypeError(
              error_class="CANNOT_BE_NONE",
              message_parameters={"arg_name": "newValue"},
          )
  
      converted = []
      if has_numpy:
          import numpy as np
  
          # In order to convert NumPy types to Python primitive types.
          for v in newValue:
              if isinstance(v, np.generic):
                  converted.append(v.tolist())
              # Address a couple of pandas dtypes too.
              elif hasattr(v, "to_pytimedelta"):
                  converted.append(v.to_pytimedelta())
              elif hasattr(v, "to_pydatetime"):
                  converted.append(v.to_pydatetime())
              else:
                  converted.append(v)
      else:
          converted = list(newValue)
  
      self._value = Row(*converted)
      self._defined = True
      self._updated = True
      self._removed = False
  
imports: import datetime
  import json
  from typing import Tuple, Optional
  from pyspark.sql.types import DateType, Row, StructType
  from pyspark.sql.utils import has_numpy
  from pyspark.errors import PySparkTypeError, PySparkValueError, PySparkRuntimeError
label_desc: Use image node_id 7 for calling the GroupState obj's underlying member method code with example usage: obj.update(newValue) without return types