// ColsByName returns a slice of columns from the row with the given
// names. It will return an error if any name is not found
ColsByName returns a slice of columns from the row with the given
names. It will return an error if any name is not found
// ColsByName returns a slice of columns from the row with the given // names . It will return an error if any name is not found
func (r *Row) ColsByName(names ...string) ([]Column, error) {
	rval := make([]Column, 0, len(names))
	for _, name := range names {
		i, ok := r.mci.nameToCol[name]
		if !ok {
			return nil, dfErrorf("Unknown column name: %q", name)
		}
		cols, err := r.ColsByIdx(i)
		if err != nil {
			return nil, err
		}
		rval = append(rval, cols...)
	}
	return rval, nil
}
func ( r * Row ) ColsByName ( names ... string ) ( [ ] Column , error ) { rval := make ( [ ] Column , 0 , len ( names ) ) for _ , name := range names { i , ok := r . mci . nameToCol [ name ] if ! ok { return nil , dfErrorf ( " " , name ) } cols , err := r . ColsByIdx ( i ) if err != nil { return nil , err } rval = append ( rval , cols ... ) } return rval , nil }
ColsByName returns a slice of columns from the row with the given
names.
ColsByName returns a slice of columns from the row with the given names .