code: def categorize(self, categories, default=None):
          
          return dim(self, categorize, categories=categories, default=default)
docs: Replaces discrete values with supplied categories
  
          Replaces discrete values in input array into a fixed set of
          categories defined either as a list or dictionary.
  
          Args:
              categories: List or dict of categories to map inputs to
              default: Default value to assign if value not in categories