class_docstr: Factory class for function transforming a string into another object
  (int, float).
  
  After initialization, an instance can be called to transform a string
  into another object. If the string is recognized as representing a
  missing value, a default value is returned.
  
  Attributes
  ----------
  func : function
      Function used for the conversion.
  default : any
      Default value to return when the input corresponds to a missing
      value.
  type : type
      Type of the output.
  _status : int
      Integer representing the order of the conversion.
  _mapper : sequence of tuples
      Sequence of tuples (dtype, function, default value) to evaluate in
      order.
  _locked : bool
      Holds `locked` parameter.
  
  Parameters
  ----------
  dtype_or_func : {None, dtype, function}, optional
      If a `dtype`, specifies the input data type, used to define a basic
      function and a default value for missing data. For example, when
      `dtype` is float, the `func` attribute is set to `float` and the
      default value to `np.nan`.  If a function, this function is used to
      convert a string to another object. In this case, it is recommended
      to give an associated default value as input.
  default : any, optional
      Value to return by default, that is, when the string to be
      converted is flagged as missing. If not given, `StringConverter`
      tries to supply a reasonable default value.
  missing_values : {None, sequence of str}, optional
      ``None`` or sequence of strings indicating a missing value. If ``None``
      then missing values are indicated by empty entries. The default is
      ``None``.
  locked : bool, optional
      Whether the StringConverter should be locked to prevent automatic
      upgrade or not. Default is False.
docstr: Set StringConverter attributes directly.
  
  Parameters
  ----------
  func : function
      Conversion function.
  default : any, optional
      Value to return by default, that is, when the string to be
      converted is flagged as missing. If not given,
      `StringConverter` tries to supply a reasonable default value.
  testing_value : str, optional
      A string representing a standard input value of the converter.
      This string is used to help defining a reasonable default
      value.
  missing_values : {sequence of str, None}, optional
      Sequence of strings indicating a missing value. If ``None``, then
      the existing `missing_values` are cleared. The default is `''`.
  locked : bool, optional
      Whether the StringConverter should be locked to prevent
      automatic upgrade or not. Default is False.
  
  Notes
  -----
  `update` takes the same parameters as the constructor of
  `StringConverter`, except that `func` does not accept a `dtype`
  whereas `dtype_or_func` in the constructor does.
docstr_tok: ["Set","StringConverter","attributes","directly",".","Parameters","--","--","--","--","--","func",":","function","Conversion","function",".","default",":","any",",","optional","Value","to","return","by","default",",","that","is",",","when","the","string","to","be","converted","is","flagged","as","missing",".","If","not","given",",","`","StringConverter","`","tries","to","supply","a","reasonable","default","value",".","testing_value",":","str",",","optional","A","string","representing","a","standard","input","value","of","the","converter",".","This","string","is","used","to","help","defining","a","reasonable","default","value",".","missing_values",":","{","sequence","of","str",",","None","}",",","optional","Sequence","of","strings","indicating","a","missing","value",".","If","``","None","``",",","then","the","existing","`","missing_values","`","are","cleared",".","The","default","is","`","``","`",".","locked",":","bool",",","optional","Whether","the","StringConverter","should","be","locked","to","prevent","automatic","upgrade","or","not",".","Default","is","False",".","Notes","--","--","-","`","update","`","takes","the","same","parameters","as","the","constructor","of","`","StringConverter","`",",","except","that","`","func","`","does","not","accept","a","`","dtype","`","whereas","`","dtype_or_func","`","in","the","constructor","does","."]
code: def update(
      self,
      func,
      default=None,
      testing_value=None,
      missing_values="",
      locked=False,
  ):
      """
      Set StringConverter attributes directly.
  
      Parameters
      ----------
      func : function
          Conversion function.
      default : any, optional
          Value to return by default, that is, when the string to be
          converted is flagged as missing. If not given,
          `StringConverter` tries to supply a reasonable default value.
      testing_value : str, optional
          A string representing a standard input value of the converter.
          This string is used to help defining a reasonable default
          value.
      missing_values : {sequence of str, None}, optional
          Sequence of strings indicating a missing value. If ``None``, then
          the existing `missing_values` are cleared. The default is `''`.
      locked : bool, optional
          Whether the StringConverter should be locked to prevent
          automatic upgrade or not. Default is False.
  
      Notes
      -----
      `update` takes the same parameters as the constructor of
      `StringConverter`, except that `func` does not accept a `dtype`
      whereas `dtype_or_func` in the constructor does.
  
      """
      self.func = func
      self._locked = locked
  
      # Don't reset the default to None if we can avoid it
      if default is not None:
          self.default = default
          self.type = self._dtypeortype(self._getdtype(default))
      else:
          try:
              tester = func(testing_value or "1")
          except (TypeError, ValueError):
              tester = None
          self.type = self._dtypeortype(self._getdtype(tester))
  
      # Add the missing values to the existing set or clear it.
      if missing_values is None:
          # Clear all missing values even though the ctor initializes it to
          # set(['']) when the argument is None.
          self.missing_values = set()
      else:
          if not np.iterable(missing_values):
              missing_values = [missing_values]
          if not all(isinstance(v, str) for v in missing_values):
              raise TypeError(
                  "missing_values must be strings or unicode"
              )
          self.missing_values.update(missing_values)
  
imports: import numpy
  import numpy.core.numeric
  from numpy.compat import asbytes, asunicode
label_desc: Use image node_id 13 for calling the StringConverter obj's underlying member method code with example usage: obj.update(func, default, testing_value, missing_values, locked) without return types