コード例 #1
0
 private void ImportRowUnchecked(DataFrameRow row)
 {
     for (int i = 0; i < this.ColumnCount; i++)
     {
         this.columns[i].Add(row[i]);
     }
     this.rowCount++;
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 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");
         }
     }
 }