private void ImportRowUnchecked(DataFrameRow row) { for (int i = 0; i < this.ColumnCount; i++) { this.columns[i].Add(row[i]); } this.rowCount++; }
public DataFrame Subset(Predicate <DataFrameRow> filter) { DataFrame newFrame = this.Clone(); for (int i = 0; i < this.rowCount; i++) { DataFrameRow row = this.rows[i]; if (filter(row)) { newFrame.ImportRowUnchecked(row); } } return(newFrame); }
public DataFrame this [BooleanArray booleanArray] { get { if (this.rowCount == booleanArray.Length) { DataFrame newFrame = this.Clone(); for (int i = 0; i < this.rowCount; i++) { if (booleanArray[i]) { DataFrameRow row = this.rows[i]; newFrame.ImportRowUnchecked(row); } } return(newFrame); } else { throw new ArgumentOutOfRangeException("booleanArray"); } } }