203 references to Count
Microsoft.Data.Analysis (37)
DataFrame.Arrow.cs (2)
189int numberOfRowsInThisRecordBatch = (int)Math.Min(recordBatchLength, Rows.Count); 207} while (numberOfRowsProcessed < Rows.Count);
DataFrame.cs (12)
181for (long i = Rows.Count - numberOfRows; i < Rows.Count; i++) 183filter[i - (Rows.Count - numberOfRows)] = i; 337if (numberOfRows > Rows.Count) 339throw new ArgumentException(string.Format(Strings.ExceedsNumberOfRows, Rows.Count), nameof(numberOfRows)); 343int shuffleUpperLimit = (int)Math.Min(Int32.MaxValue, Rows.Count); 418filter.AppendMany(true, Rows.Count); 438filter.AppendMany(false, Rows.Count); 661if (column.Length == Rows.Count) 721long numberOfRows = Math.Min(Rows.Count, rowsToShow); 731if (numberOfRows < Rows.Count) 733sb.Append(String.Format(Strings.AmountOfRowsShown, rowsToShow, Rows.Count));
DataFrame.IDataView.cs (2)
41long? IDataView.GetRowCount() => Rows.Count; 137return _position < _dataFrame.Rows.Count;
DataFrame.Join.cs (20)
57long minLength = Math.Min(Rows.Count, other.Rows.Count); 66if (other.Rows.Count < Rows.Count) 68newColumn = other.Columns[i].Clone(numberOfNullsToAppend: Rows.Count - other.Rows.Count); 80long minLength = Math.Min(Rows.Count, other.Rows.Count); 89if (Rows.Count < other.Rows.Count) 91newColumn = Columns[i].Clone(numberOfNullsToAppend: other.Rows.Count - Rows.Count); 108long newRowCount = Math.Max(Rows.Count, other.Rows.Count); 109long numberOfNulls = newRowCount - Rows.Count; 115numberOfNulls = newRowCount - other.Rows.Count; 125long newRowCount = Math.Min(Rows.Count, other.Rows.Count); 360isLeftDataFrameRetained = (Rows.Count > other.Rows.Count);
DataFrameRowCollection.cs (1)
43for (long i = 0; i < Count; i++)
Microsoft.Data.Analysis.Interactive (5)
DataFrameKernelExtension.cs (5)
50if (df.Rows.Count > rowsPerPage) 52var maxMessage = df.Rows.Count > maxRowCount ? $" (showing a max of {maxRowCount} rows)" : string.Empty; 53var title = h3[style: "text-align: center;"]($"DataFrame - {df.Rows.Count} rows {maxMessage}"); 56var rowCount = Math.Min(maxRowCount, df.Rows.Count); 111for (var index = 0; index < df.Rows.Count; index++)
Microsoft.Data.Analysis.Tests (161)
ArrowIntegrationTests.cs (1)
206Assert.Equal(0, emptyDataFrame.Rows.Count);
DataFrame.IOTests.cs (36)
156Assert.Equal(4, df.Rows.Count); 168Assert.Equal(3, reducedRows.Rows.Count); 190Assert.Equal(4, df.Rows.Count); 240Assert.Equal(4, df.Rows.Count); 269Assert.Equal(4, df.Rows.Count); 282Assert.Equal(3, reducedRows.Rows.Count); 308Assert.Equal(4, df.Rows.Count); 321Assert.Equal(3, reducedRows.Rows.Count); 335Assert.Equal(4, df.Rows.Count); 448Assert.Equal(5, df.Rows.Count); 507Assert.Equal(5, df.Rows.Count); 584Assert.Equal(5, df.Rows.Count); 590Assert.Equal(3, reducedRows.Rows.Count); 623Assert.Equal(5, df.Rows.Count); 629Assert.Equal(3, reducedRows.Rows.Count); 661Assert.Equal(4, df.Rows.Count); 667Assert.Equal(3, reducedRows.Rows.Count); 760Assert.Equal(4, df.Rows.Count); 766Assert.Equal(3, reducedRows.Rows.Count); 791Assert.Equal(6, df.Rows.Count); 834Assert.Equal(6, df.Rows.Count); 896Assert.Equal(6, df.Rows.Count); 965Assert.Equal(dataFrame.Rows.Count, readIn.Rows.Count); 985Assert.Equal(dataFrame.Rows.Count, readIn.Rows.Count); 1016Assert.Equal(dataFrame.Rows.Count, readIn.Rows.Count); 1049Assert.Equal(dataFrame.Rows.Count, readIn.Rows.Count); 1087Assert.Equal(dataFrame.Rows.Count, readIn.Rows.Count); 1114Assert.Equal(dataFrame.Rows.Count, readIn.Rows.Count); 1141Assert.Equal(6, df.Rows.Count); 1302Assert.Equal(_rowCount, df.Rows.Count);
DataFrameIDataViewTests.cs (10)
110DataFrameColumn boolColumn = new PrimitiveDataFrameColumn<bool>("Bool", Enumerable.Range(0, (int)df.Rows.Count).Select(x => x % 2 == 1)); 257Assert.Equal(dfAsIDataView.GetRowCount(), newDf.Rows.Count); 271Assert.Equal(dfAsIDataView.GetRowCount(), newDf.Rows.Count); 301Assert.Equal(rowSize, newDf.Rows.Count); 324Assert.Equal(5, newDf.Rows.Count); 382Assert.Equal(6, df.Rows.Count); 399Assert.Equal(6, df.Rows.Count); 417Assert.Equal(maxRows, df.Rows.Count); 434Assert.Equal(3, df.Rows.Count); 486Assert.Equal(2, df.Rows.Count);
DataFrameTests.cs (54)
66Assert.Equal(rowCount, dataFrame.Rows.Count); 154Assert.Equal(10, dataFrame.Rows.Count); 158Assert.Equal(0, dataFrame.Rows.Count); 173Assert.Equal(0, dataFrame.Rows.Count); 301Assert.Equal(2, count.Rows.Count); 304for (int r = 0; r < count.Rows.Count; r++) 313Assert.Equal(2, first.Rows.Count); 343Assert.Equal(6, head.Rows.Count); 346Assert.Equal(6, tail.Rows.Count); 360Assert.Equal(2, max.Rows.Count); 374Assert.Equal(2, min.Rows.Count); 377Assert.Equal(2, product.Rows.Count); 380Assert.Equal(2, sum.Rows.Count); 383Assert.Equal(2, mean.Rows.Count); 421Assert.Equal(2, countIntColumn.Rows.Count); 427Assert.Equal(2, firstDecimalColumn.Rows.Count); 438Assert.Equal(2, grouped.Rows.Count); 706Assert.Equal(7, sampled.Rows.Count); 715Assert.Equal(uniqueRowValues.Count, sampled.Rows.Count); 789Assert.Equal(18, anyNulls.Rows.Count); 792Assert.Equal(19, allNulls.Rows.Count); 860Assert.Equal(2, valueCounts.Rows.Count); 917Assert.Equal(intDfLength, clone.Rows.Count); 923for (long r = 0; r < clone.Rows.Count; r++) 963Assert.Equal(10, rows.Count); 978Assert.Equal(df.Rows.Count, rowCount); 1018Assert.Equal(10, df.Rows.Count); 1023Assert.Equal(10, df.Rows.Count); 1031Assert.Equal(15, ret.Rows.Count); 1034for (long i = 0; i < ret.Rows.Count; i++) 1039if (i < check1.Rows.Count) 1045Assert.Equal(row[j]?.ToString(), (check2.Rows[i - check1.Rows.Count][j])?.ToString()); 1073Assert.Equal(6, resultDataFrame.Rows.Count); 1090Assert.Equal(11, df.Rows.Count); 1095Assert.Equal(12, ret.Rows.Count); 1100Assert.Equal(12, df.Rows.Count); 1105Assert.Equal(13, ret.Rows.Count); 1110Assert.Equal(13, df.Rows.Count); 1114Assert.Equal(14, ret.Rows.Count); 1119Assert.Equal(14, df.Rows.Count); 1123Assert.Equal(15, ret.Rows.Count); 1128Assert.Equal(15, df.Rows.Count); 1135Assert.Equal(16, ret.Rows.Count); 1143Assert.Equal(16, df.Rows.Count); 1149Assert.Equal(17, ret.Rows.Count); 1156Assert.Equal(17, df.Rows.Count); 1162Assert.Equal(18, ret.Rows.Count); 1174Assert.Equal(18, df.Rows.Count); 1181Assert.Equal(18, df.Rows.Count); 1186Assert.Equal(19, ret.Rows.Count); 1198Assert.Equal(11, df.Rows.Count); 1206Assert.Equal(12, df.Rows.Count); 1212Assert.Equal(13, df.Rows.Count); 1388Assert.Equal(2, filteredNullDf.Rows.Count);
DataFrameTests.Filter.cs (1)
34Assert.Equal(5, boolColumnFiltered.Rows.Count);
DataFrameTests.Join.cs (25)
25Assert.Equal(join.Rows.Count, left.Rows.Count); 32Assert.Equal(join.Rows.Count, right.Rows.Count); 40Assert.Equal(join.Rows.Count, left.Rows.Count); 47Assert.Equal(join.Rows.Count, right.Rows.Count); 57Assert.Equal(join.Rows.Count, left.Rows.Count); 64Assert.Equal(join.Rows.Count, right.Rows.Count); 72Assert.Equal(join.Rows.Count, right.Rows.Count); 79Assert.Equal(join.Rows.Count, left.Rows.Count); 87Int64DataFrameColumn mapIndices = new Int64DataFrameColumn("map", join.Rows.Count); 88for (long i = 0; i < join.Rows.Count; i++) 108DataFrameColumn compareColumn = rightColumn.Length <= join.Rows.Count ? rightColumn.Clone(numberOfNullsToAppend: join.Rows.Count - rightColumn.Length) : rightColumn.Clone(mapIndices); 117DataFrameColumn compareColumn = leftColumn.Length <= join.Rows.Count ? leftColumn.Clone(numberOfNullsToAppend: join.Rows.Count - leftColumn.Length) : leftColumn.Clone(mapIndices); 146isEqual = joinColumn.ElementwiseEquals(leftColumn.Clone(numberOfNullsToAppend: join.Rows.Count - leftColumn.Length)); 152isEqual = joinColumn.ElementwiseEquals(rightColumn.Clone(numberOfNullsToAppend: join.Rows.Count - rightColumn.Length)); 155for (int j = 0; j < join.Rows.Count; j++)
DataFrameTests.Merge.cs (23)
44Assert.Equal(10, merge.Rows.Count); 52Assert.Equal(5, merge.Rows.Count); 60Assert.Equal(merge.Rows.Count, left.Rows.Count); 67Assert.Equal(merge.Rows.Count, right.Rows.Count); 77Assert.Equal(merge.Rows.Count, left.Rows.Count); 84Assert.Equal(merge.Rows.Count, right.Rows.Count); 92Assert.Equal(16, merge.Rows.Count); 100Assert.Equal(9, merge.Rows.Count); 151Assert.Equal(10, merge.Rows.Count); 209Assert.Equal(7, merge.Rows.Count); 259Assert.Equal(9, merge.Rows.Count); 348Assert.Equal(expectedMerged.Length, merge.Rows.Count); 407Assert.Equal(expectedMerged.Length, merge.Rows.Count); 465Assert.Equal(expectedMerged.Length, merge.Rows.Count); 521Assert.Equal(expectedMerged.Length, merge.Rows.Count); 581Assert.Equal(expectedMerged.Length, merge.Rows.Count); 637Assert.Equal(expectedMerged.Length, merge.Rows.Count); 693Assert.Equal(expectedMerged.Length, merge.Rows.Count); 710Assert.Equal(2, merge.Rows.Count);
DataFrameTests.Sort.cs (7)
21df.Columns["Int"][df.Rows.Count - 1] = -1; 28Assert.Null(sortedDf.Columns["Int"][sortedDf.Rows.Count - 1]); 30Assert.Equal(100000, sortedDf.Columns["Int"][sortedDf.Rows.Count - 3]); 31Assert.Equal(200000, sortedDf.Columns["Int"][sortedDf.Rows.Count - 2]); 111Assert.Equal(10, sortedDataFrame.Rows.Count); 112DataFrameRow lastRow = sortedDataFrame.Rows[sortedDataFrame.Rows.Count - 1]; 113DataFrameRow penultimateRow = sortedDataFrame.Rows[sortedDataFrame.Rows.Count - 2];
DataFrameTests.Utils.cs (3)
224IEnumerable<int> randomIndices = Enumerable.Range(0, (int)input.Rows.Count); 225IEnumerable<int> trainIndices = randomIndices.Take((int)(input.Rows.Count * testRatio)); 226IEnumerable<int> testIndices = randomIndices.Skip((int)(input.Rows.Count * testRatio));
PrimitiveDataFrameColumnTests.cs (1)
517Assert.Equal(2, filteredNullDf.Rows.Count);