code: def select(cls, verb):
          
          columns = verb.data.columns
          contains = verb.contains
          matches = verb.matches
  
          groups = _get_groups(verb)
          names = cls._resolve_slices(columns, verb.names)
          names_set = set(names)
          groups_set = set(groups)
          lst = [[]]
  
          if names or groups:
              # group variable missing from the selection are prepended
              missing = [g for g in groups if g not in names_set]
              missing_set = set(missing)
              c1 = missing + [x for x in names if x not in missing_set]
              lst.append(c1)
  
          if verb.startswith:
              c2 = [x for x in columns
                    if isinstance(x, str) and x.startswith(verb.startswith)]
              lst.append(c2)
  
          if verb.endswith:
              c3 = [x for x in columns if
                    isinstance(x, str) and x.endswith(verb.endswith)]
              lst.append(c3)
  
          if contains:
              c4 = []
              for col in columns:
                  if (isinstance(col, str) and
                          any(s in col for s in contains)):
                      c4.append(col)
              lst.append(c4)
  
          if matches:
              c5 = []
              patterns = [x if hasattr(x, 'match') else re.compile(x)
                          for x in matches]
              for col in columns:
                  if isinstance(col, str):
                      if any(bool(p.match(col)) for p in patterns):
                          c5.append(col)
  
              lst.append(c5)
  
          selected = unique(list(itertools.chain(*lst)))
  
          if verb.drop:
              to_drop = [col for col in selected if col not in groups_set]
              selected = [col for col in columns if col not in to_drop]
  
          return selected
docs: Return selected columns for the select verb
  
          Parameters
          ----------
          verb : object
              verb with the column selection attributes:
  
                  - names
                  - startswith
                  - endswith
                  - contains
                  - matches