Remove all columns that contain the same value in all rows
436476
def delete_homogenous_columns!(*options)
      return if rows.size < 2

      exceptions = extract_exceptions(options)

      (columns.map(&:key) - exceptions).each do |key|
        value = rows.first[key]
        delete_column key if rows.all? { |row| row[key] == value }
      end
    end
320269
@Override
    public Table removeColumns(Column<?>... columns) {
        columnList.removeAll(Arrays.asList(columns));
        return this;
    }
1168758
def rowxcol(row, col):
    """"""
    row = row.reshape(4, 4)
    col = col.reshape(4, 8)
    ret = uint2exprs(0, 8)
    for i in range(4):
        for j in range(4):
            if row[i, j]:
                ret ^= xtime(col[i], j)
    return ret
828684
def filter_exclude(df, s):
    
    keep = ~np.array( [s in c for c in df.columns.values] )
    return df.iloc[:, keep]
602232
def strip_rows(array,invalid=None):
    ''' '''
    array = np.array(array)
    none_indices = np.where(np.any(np.equal(array,invalid),axis=0))
    return tuple(np.delete(array,none_indices,axis=1))
1345186
def clear(self):
        
        model = self.tree.model()
        # Don't use model.clear(). it will delete the column sizes
        model.removeRows(0, 1)
        model.setRowCount(1)
        self._setColumnCountForContents()
1177057
function validateColumns(columns) {
  if (!columns) {
    return;
  }

  // check IDs
  var ids = {};
  columns.forEach(function (column, i) {
    var id = column.id;

    if (!ids[id]) {
      ids[id] = [i];
    } else {
      ids[id].push(i);
    }
  });
  Object.keys(ids).forEach(function (id) {
    if (ids[id].length > 1) {
      console.warn('Column ID \'' + id + '\' used in multiple columns ' + ids[id].join(', '), ids[id].map(function (index) {
        return columns[index];
      }));
    }
  });
}
24125
def dedupe_cols(frame):
    

    cols = list(frame.columns)
    for i, item in enumerate(frame.columns):
        if item in frame.columns[:i]:
            cols[i] = "toDROP"
    frame.columns = cols
    return frame.drop("toDROP", 1, errors='ignore')
1268256
def clean(self):
        
        for key, value in self.values.copy().items():
            if value is None:
                del self.values[key]
1350331
def invert_delete_row2(self, key, value):
        
        self.rows = filter(lambda x: x.get(key) == x.get(value), self.rows)
949179
def _compare_columns(self, new_columns, old_columns):
        
        '''  '''
        
        # print(new_columns)
        # print(old_columns)
        
        add_columns = {}
        remove_columns = {}
        rename_columns = {}
        retype_columns = {}
        resize_columns = {}
        for key, value in new_columns.items():
            if key not in old_columns.keys():
                add_columns[key] = True
                if value[2]:
                    if value[2] in old_columns.keys():
                        rename_columns[key] = value[2]
                        del add_columns[key]
            else:
                if value[1] != old_columns[key][1]:
                    retype_columns[key] = value[1]
                if value[3] != old_columns[key][3]:
                    resize_columns[key] = value[3]
        remove_keys = set(old_columns.keys()) - set(new_columns.keys())
        if remove_keys:
            for key in list(remove_keys):
                remove_columns[key] = True
        
        return add_columns, remove_columns, rename_columns, retype_columns, resize_columns
481489
def invert_delete_row(self, key, value):
        
        self.rows = filter(lambda x: x.get(key) == value, self.rows)
1031091
def exclude(self, col: str, val):
        
        try:
            self.df = self.df[self.df[col] != val]
        except Exception as e:
            self.err(e, "Can not exclude rows based on value " + str(val))
806131
def remove(self, value):
        
        self._col_list.remove(value)
        self._col_dict.pop(self._get_object_key(value))
864880
def drop_columns(self, col):
        
        try:
            self.cleaned_data.drop(col, axis=1, inplace=True)
        except Exception as e:
            raise e
527246
def strip_columns(tab):
    """"""
    for colname in tab.colnames:
        if tab[colname].dtype.kind in ['S', 'U']:
            tab[colname] = np.core.defchararray.strip(tab[colname])
78500
static function cleanAll()
    {
        $db = eZDB::instance();
        $definition = eZISBNRegistrantRange::definition();
        $table = $definition['name'];
        $sql = "TRUNCATE TABLE " . $table;
        $db->query( $sql );
    }