docstr: Map new values to integer identifiers.
  
  Parameters
  ----------
  data : iterable of str or bytes
  
  Raises
  ------
  TypeError
      If elements in *data* are neither str nor bytes.
docstr_tok: ["Map","new","values","to","integer","identifiers",".","Parameters","--","--","--","--","--","data",":","iterable","of","str","or","bytes","Raises","--","--","--","TypeError","If","elements","in","*","data","*","are","neither","str","nor","bytes","."]
code: def update(self, data):
      """
      Map new values to integer identifiers.
  
      Parameters
      ----------
      data : iterable of str or bytes
  
      Raises
      ------
      TypeError
          If elements in *data* are neither str nor bytes.
      """
      data = np.atleast_1d(np.array(data, dtype=object))
      # check if convertible to number:
      convertible = True
      for val in OrderedDict.fromkeys(data):
          # OrderedDict just iterates over unique values in data.
          _api.check_isinstance((str, bytes), value=val)
          if convertible:
              # this will only be called so long as convertible is True.
              convertible = self._str_is_convertible(val)
          if val not in self._mapping:
              self._mapping[val] = next(self._counter)
      if data.size and convertible:
          _log.info(
              "Using categorical units to plot a list of strings "
              "that are all parsable as floats or dates. If these "
              "strings should be plotted as numbers, cast to the "
              "appropriate data type before plotting."
          )
  
imports: from collections import OrderedDict
  import dateutil.parser
  import itertools
  import logging
  import numpy
  from matplotlib import _api, ticker, units
label_desc: Use image node_id 3 for calling the UnitData obj's underlying member method code with example usage: obj.update(data) without return types