def check_and_invert(columns, excluded):
    """
  Returns the subset of column names that is not in excluded
  """
    if isinstance(excluded, str):
        excluded = [excluded]

    included = columns.tolist()
    for exclude in excluded:
        if exclude in included:
            included.remove(exclude)
    return included