// Row returns the i'th row from the dataframe. If i is negative or greater
// than or equal to the maximum number of rows then the values will all be NA
Row returns the i'th row from the dataframe. If i is negative or greater
than or equal to the maximum number of rows then the values will all be NA
// Row returns the i ' th row from the dataframe . If i is negative or greater // than or equal to the maximum number of rows then the values will all be NA
func (df *DF) Row(i int) *Row {
	if i < 0 || i >= df.RowCount() {
		return df.RowNA()
	}
	r := &Row{
		mci: df.mci.Clone(),
	}
	for cidx, cinfo := range df.mci.info {
		switch cinfo.colType {
		case ColTypeBool:
			r.rd.boolVals = append(r.rd.boolVals,
				df.boolCols[df.mci.valIdx[cidx]][i])
		case ColTypeInt:
			r.rd.intVals = append(r.rd.intVals,
				df.intCols[df.mci.valIdx[cidx]][i])
		case ColTypeFloat:
			r.rd.floatVals = append(r.rd.floatVals,
				df.floatCols[df.mci.valIdx[cidx]][i])
		case ColTypeString:
			r.rd.stringVals = append(r.rd.stringVals,
				df.stringCols[df.mci.valIdx[cidx]][i])
		}
	}
	return r
}
func ( df * DF ) Row ( i int ) * Row { if i < 0 || i >= df . RowCount ( ) { return df . RowNA ( ) } r := & Row { mci : df . mci . Clone ( ) , } for cidx , cinfo := range df . mci . info { switch cinfo . colType { case ColTypeBool : r . rd . boolVals = append ( r . rd . boolVals , df . boolCols [ df . mci . valIdx [ cidx ] ] [ i ] ) case ColTypeInt : r . rd . intVals = append ( r . rd . intVals , df . intCols [ df . mci . valIdx [ cidx ] ] [ i ] ) case ColTypeFloat : r . rd . floatVals = append ( r . rd . floatVals , df . floatCols [ df . mci . valIdx [ cidx ] ] [ i ] ) case ColTypeString : r . rd . stringVals = append ( r . rd . stringVals , df . stringCols [ df . mci . valIdx [ cidx ] ] [ i ] ) } } return r }
Row returns the i'th row from the dataframe.
Row returns the i ' th row from the dataframe .