code: def columns(table, missing=None):
      
  
      cols = OrderedDict()
      it = iter(table)
      hdr = next(it)
      flds = list(map(text_type, hdr))
      for f in flds:
          cols[f] = list()
      for row in it:
          for f, v in izip_longest(flds, row, fillvalue=missing):
              if f in cols:
                  cols[f].append(v)
      return cols
docs: Construct a :class:`dict` mapping field names to lists of values. E.g.::
  
          >>> import petl as etl
          >>> table = [['foo', 'bar'], ['a', 1], ['b', 2], ['b', 3]]
          >>> cols = etl.columns(table)
          >>> cols['foo']
          ['a', 'b', 'b']
          >>> cols['bar']
          [1, 2, 3]
  
      See also :func:`petl.util.materialise.facetcolumns`.