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