def _apply_include_exclude_names(table, names, include_names, exclude_names):
 if (names is not None):
  xxxs = ('x' * max((len(name) for name in (list(names) + list(table.colnames)))))
  for (ii, colname) in enumerate(table.colnames):
   table.rename_column(colname, (xxxs + str(ii)))
  for (ii, name) in enumerate(names):
   table.rename_column((xxxs + str(ii)), name)
 names = set(table.colnames)
 if (include_names is not None):
  names.intersection_update(include_names)
 if (exclude_names is not None):
  names.difference_update(exclude_names)
 if (names != set(table.colnames)):
  remove_names = (set(table.colnames) - set(names))
  table.remove_columns(remove_names)

def _apply_include_exclude_names ( table , names , include_names , exclude_names ) : if ( names is not None ) : xxxs = ( 'x' * max ( ( len ( name ) for name in ( list ( names ) + list ( table . colnames ) ) ) ) ) for ( ii , colname ) in enumerate ( table . colnames ) : table . rename_column ( colname , ( xxxs + str ( ii ) ) ) for ( ii , name ) in enumerate ( names ) : table . rename_column ( ( xxxs + str ( ii ) ) , name ) names = set ( table . colnames ) if ( include_names is not None ) : names . intersection_update ( include_names ) if ( exclude_names is not None ) : names . difference_update ( exclude_names ) if ( names != set ( table . colnames ) ) : remove_names = ( set ( table . colnames ) - set ( names ) ) table . remove_columns ( remove_names )
apply names .