def set_filter(self, names=None):
_names = []<EOL>if names:<EOL><INDENT>for name in names:<EOL><INDENT>_safe_name = safe_name(name)<EOL>if _safe_name not in self._column_map:<EOL><INDENT>raise GiraffeTypeError("<STR_LIT>".format(name))<EOL><DEDENT>if _safe_name in _names:<EOL><INDENT>continue<EOL><DEDENT>_names.append(_safe_name)<EOL><DEDENT><DEDENT>self._filtered_columns = _names<EOL>
Set the names of columns to be used when iterating through the list,
retrieving names, etc.

:param list names: A list of names to be used, or :code:`None` for all