code: def wrap(self, values):
          
          if isinstance(values, Value):
              return values
          cols = dict([(L, []) for L in self.labels])
          try:
              # unzip list of dict
              for V in values:
                  for L in self.labels:
                      try:
                          cols[L].append(V[L])
                      except (IndexError, KeyError):
                          pass
              # allow omit empty columns
              for L in self.labels:
                  V = cols[L]
                  if len(V) == 0:
                      del cols[L]
  
              try:
                  return self.Value(self.type, {
                      'labels': self.labels,
                      'value': cols,
                  })
              except:
                  _log.error("Failed to encode '%s' with %s", cols, self.labels)
                  raise
          except:
              _log.exception("Failed to wrap: %s", values)
              raise
docs: Pack an iterable of dict into a Value
  
          >>> T=NTTable([('A', 'ai'), ('B', 'as')])
          >>> V = T.wrap([
              {'A':42, 'B':'one'},
              {'A':43, 'B':'two'},
          ])