// RejectColumns returns only columns not matching names.
RejectColumns returns only columns not matching names.
// RejectColumns returns only columns not matching names .
func (df *DataFrame) RejectColumns(names ...string) []array.Column {
	if len(names) == 0 {
		return df.Columns()
	}
	set := make(map[string]struct{}, len(names))
	for _, name := range names {
		set[name] = struct{}{}
	}
	cols := make([]array.Column, 0, df.NumCols()-len(names))
	dfColumns := df.Columns()
	for i := range dfColumns {
		if _, drop := set[dfColumns[i].Name()]; drop {
			continue
		}
		cols = append(cols, dfColumns[i])
	}
	return cols[:len(cols):len(cols)]
}
func ( df * DataFrame ) RejectColumns ( names ... string ) [ ] array . Column { if len ( names ) == 0 { return df . Columns ( ) } set := make ( map [ string ] struct { } , len ( names ) ) for _ , name := range names { set [ name ] = struct { } { } } cols := make ( [ ] array . Column , 0 , df . NumCols ( ) - len ( names ) ) dfColumns := df . Columns ( ) for i := range dfColumns { if _ , drop := set [ dfColumns [ i ] . Name ( ) ] ; drop { continue } cols = append ( cols , dfColumns [ i ] ) } return cols [ : len ( cols ) : len ( cols ) ] }
RejectColumns returns only columns not matching names.
RejectColumns returns only columns not matching names .