class_docstr: class to return canonical code(s) from code or aliases
  
  The concept is a lot easier to read in the implementation and
  tests than it is to explain, so...
  
  >>> # If you have some codes, and several aliases, like this:
  >>> code1 = 1; aliases1=['one', 'first']
  >>> code2 = 2; aliases2=['two', 'second']
  >>> # You might want to do this:
  >>> codes = [[code1]+aliases1,[code2]+aliases2]
  >>> recodes = Recoder(codes)
  >>> recodes.code['one']
  1
  >>> recodes.code['second']
  2
  >>> recodes.code[2]
  2
  >>> # Or maybe you have a code, a label and some aliases
  >>> codes=((1,'label1','one', 'first'),(2,'label2','two'))
  >>> # you might want to get back the code or the label
  >>> recodes = Recoder(codes, fields=('code','label'))
  >>> recodes.code['first']
  1
  >>> recodes.code['label1']
  1
  >>> recodes.label[2]
  'label2'
  >>> # For convenience, you can get the first entered name by
  >>> # indexing the object directly
  >>> recodes[2]
  2
class_docstr_tok: ["class","to","return","canonical","code","(","s",")","from","code","or","aliases","The","concept","is","a","lot","easier","to","read","in","the","implementation","and","tests","than","it","is","to","explain",",","so","...",">",">",">","#","If","you","have","some","codes",",","and","several","aliases",",","like","this",":",">",">",">","code1","=","1",";","aliases1=","[","'one","'",",","'first","'","]",">",">",">","code2","=","2",";","aliases2=","[","'two","'",",","'second","'","]",">",">",">","#","You","might","want","to","do","this",":",">",">",">","codes","=","[","[","code1","]","+aliases1",",","[","code2","]","+aliases2","]",">",">",">","recodes","=","Recoder","(","codes",")",">",">",">","recodes.code","[","'one","'","]","1",">",">",">","recodes.code","[","'second","'","]","2",">",">",">","recodes.code","[","2","]","2",">",">",">","#","Or","maybe","you","have","a","code",",","a","label","and","some","aliases",">",">",">","codes=","(","(","1",",","'label1","'",",","'one","'",",","'first","'",")",",","(","2",",","'label2","'",",","'two","'",")",")",">",">",">","#","you","might","want","to","get","back","the","code","or","the","label",">",">",">","recodes","=","Recoder","(","codes",",","fields=","(","'code","'",",","'label","'",")",")",">",">",">","recodes.code","[","'first","'","]","1",">",">",">","recodes.code","[","'label1","'","]","1",">",">",">","recodes.label","[","2","]","'label2'",">",">",">","#","For","convenience",",","you","can","get","the","first","entered","name","by",">",">",">","#","indexing","the","object","directly",">",">",">","recodes","[","2","]","2"]
docstr: Return OrderedSet of possible returned values for column
  
  By default, the column is the first column.
  
  Returns same values as ``set(obj.field1.values())`` and,
  with the default initializing``fields`` argument of
  fields=('code',), this will return the same as
  ``set(obj.code.values())``
  
  Parameters
  ----------
  name : {None, string}
      Where default of none gives result for first column
  
  >>> codes = ((1, 'one'), (2, 'two'), (1, 'repeat value'))
  >>> vs = Recoder(codes).value_set()
  >>> vs == set([1, 2]) # Sets are not ordered, hence this test
  True
  >>> rc = Recoder(codes, fields=('code', 'label'))
  >>> rc.value_set('label') == set(('one', 'two', 'repeat value'))
  True
docstr_tok: ["Return","OrderedSet","of","possible","returned","values","for","column","By","default",",","the","column","is","the","first","column",".","Returns","same","values","as","``","set","(","obj.field1.values","(",")",")","``","and",",","with","the","default","initializing","``","fields","``","argument","of","fields=","(","'code","'",",",")",",","this","will","return","the","same","as","``","set","(","obj.code.values","(",")",")","``","Parameters","--","--","--","--","--","name",":","{","None",",","string","}","Where","default","of","none","gives","result","for","first","column",">",">",">","codes","=","(","(","1",",","'one","'",")",",","(","2",",","'two","'",")",",","(","1",",","'repeat","value","'",")",")",">",">",">","vs","=","Recoder","(","codes",")",".value_set","(",")",">",">",">","vs","==","set","(","[","1",",","2","]",")","#","Sets","are","not","ordered",",","hence","this","test","True",">",">",">","rc","=","Recoder","(","codes",",","fields=","(","'code","'",",","'label","'",")",")",">",">",">","rc.value_set","(","'label","'",")","==","set","(","(","'one","'",",","'two","'",",","'repeat","value","'",")",")","True"]
code: def value_set(self, name: str | None = None) -> OrderedSet:
      """Return OrderedSet of possible returned values for column
  
      By default, the column is the first column.
  
      Returns same values as ``set(obj.field1.values())`` and,
      with the default initializing``fields`` argument of
      fields=('code',), this will return the same as
      ``set(obj.code.values())``
  
      Parameters
      ----------
      name : {None, string}
          Where default of none gives result for first column
  
      >>> codes = ((1, 'one'), (2, 'two'), (1, 'repeat value'))
      >>> vs = Recoder(codes).value_set()
      >>> vs == set([1, 2]) # Sets are not ordered, hence this test
      True
      >>> rc = Recoder(codes, fields=('code', 'label'))
      >>> rc.value_set('label') == set(('one', 'two', 'repeat value'))
      True
      """
      if name is None:
          d = self.field1
      else:
          d = self.__dict__[name]
      return OrderedSet(d.values())
  
imports: from __future__ import annotations
  import io
  import sys
  import typing
  import warnings
  from functools import reduce
  from operator import getitem, mul
  from os.path import exists, splitext
  import numpy
  from ._compression import COMPRESSED_FILE_LIKES
  from .casting import OK_FLOATS, shared_range
  from .externals.oset import OrderedSet
label_desc: Use image node_id 7 for calling the Recoder obj's underlying member method code with example usage: obj.value_set(name) and returns: OrderedSet