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)
217
Assert.Equal(0, emptyDataFrame.Rows.
Count
);
DataFrame.IOTests.cs (36)
162
Assert.Equal(4, df.Rows.
Count
);
174
Assert.Equal(3, reducedRows.Rows.
Count
);
196
Assert.Equal(4, df.Rows.
Count
);
246
Assert.Equal(4, df.Rows.
Count
);
275
Assert.Equal(4, df.Rows.
Count
);
288
Assert.Equal(3, reducedRows.Rows.
Count
);
314
Assert.Equal(4, df.Rows.
Count
);
327
Assert.Equal(3, reducedRows.Rows.
Count
);
341
Assert.Equal(4, df.Rows.
Count
);
454
Assert.Equal(5, df.Rows.
Count
);
513
Assert.Equal(5, df.Rows.
Count
);
590
Assert.Equal(5, df.Rows.
Count
);
596
Assert.Equal(3, reducedRows.Rows.
Count
);
629
Assert.Equal(5, df.Rows.
Count
);
635
Assert.Equal(3, reducedRows.Rows.
Count
);
667
Assert.Equal(4, df.Rows.
Count
);
673
Assert.Equal(3, reducedRows.Rows.
Count
);
766
Assert.Equal(4, df.Rows.
Count
);
772
Assert.Equal(3, reducedRows.Rows.
Count
);
797
Assert.Equal(6, df.Rows.
Count
);
840
Assert.Equal(6, df.Rows.
Count
);
902
Assert.Equal(6, df.Rows.
Count
);
971
Assert.Equal(dataFrame.Rows.
Count
, readIn.Rows.
Count
);
991
Assert.Equal(dataFrame.Rows.
Count
, readIn.Rows.
Count
);
1022
Assert.Equal(dataFrame.Rows.
Count
, readIn.Rows.
Count
);
1055
Assert.Equal(dataFrame.Rows.
Count
, readIn.Rows.
Count
);
1093
Assert.Equal(dataFrame.Rows.
Count
, readIn.Rows.
Count
);
1120
Assert.Equal(dataFrame.Rows.
Count
, readIn.Rows.
Count
);
1147
Assert.Equal(6, df.Rows.
Count
);
1308
Assert.Equal(_rowCount, df.Rows.
Count
);
DataFrameIDataViewTests.cs (10)
116
DataFrameColumn boolColumn = new PrimitiveDataFrameColumn<bool>("Bool", Enumerable.Range(0, (int)df.Rows.
Count
).Select(x => x % 2 == 1));
263
Assert.Equal(dfAsIDataView.GetRowCount(), newDf.Rows.
Count
);
277
Assert.Equal(dfAsIDataView.GetRowCount(), newDf.Rows.
Count
);
307
Assert.Equal(rowSize, newDf.Rows.
Count
);
330
Assert.Equal(5, newDf.Rows.
Count
);
388
Assert.Equal(6, df.Rows.
Count
);
405
Assert.Equal(6, df.Rows.
Count
);
423
Assert.Equal(maxRows, df.Rows.
Count
);
440
Assert.Equal(3, df.Rows.
Count
);
492
Assert.Equal(2, df.Rows.
Count
);
DataFrameTests.cs (54)
68
Assert.Equal(rowCount, dataFrame.Rows.
Count
);
156
Assert.Equal(10, dataFrame.Rows.
Count
);
160
Assert.Equal(0, dataFrame.Rows.
Count
);
175
Assert.Equal(0, dataFrame.Rows.
Count
);
303
Assert.Equal(2, count.Rows.
Count
);
306
for (int r = 0; r < count.Rows.
Count
; r++)
315
Assert.Equal(2, first.Rows.
Count
);
345
Assert.Equal(6, head.Rows.
Count
);
348
Assert.Equal(6, tail.Rows.
Count
);
362
Assert.Equal(2, max.Rows.
Count
);
376
Assert.Equal(2, min.Rows.
Count
);
379
Assert.Equal(2, product.Rows.
Count
);
382
Assert.Equal(2, sum.Rows.
Count
);
385
Assert.Equal(2, mean.Rows.
Count
);
423
Assert.Equal(2, countIntColumn.Rows.
Count
);
429
Assert.Equal(2, firstDecimalColumn.Rows.
Count
);
440
Assert.Equal(2, grouped.Rows.
Count
);
708
Assert.Equal(7, sampled.Rows.
Count
);
717
Assert.Equal(uniqueRowValues.Count, sampled.Rows.
Count
);
791
Assert.Equal(18, anyNulls.Rows.
Count
);
794
Assert.Equal(19, allNulls.Rows.
Count
);
862
Assert.Equal(2, valueCounts.Rows.
Count
);
919
Assert.Equal(intDfLength, clone.Rows.
Count
);
925
for (long r = 0; r < clone.Rows.
Count
; r++)
965
Assert.Equal(10, rows.
Count
);
980
Assert.Equal(df.Rows.
Count
, rowCount);
1020
Assert.Equal(10, df.Rows.
Count
);
1025
Assert.Equal(10, df.Rows.
Count
);
1033
Assert.Equal(15, ret.Rows.
Count
);
1036
for (long i = 0; i < ret.Rows.
Count
; i++)
1041
if (i < check1.Rows.
Count
)
1047
Assert.Equal(row[j]?.ToString(), (check2.Rows[i - check1.Rows.
Count
][j])?.ToString());
1075
Assert.Equal(6, resultDataFrame.Rows.
Count
);
1092
Assert.Equal(11, df.Rows.
Count
);
1097
Assert.Equal(12, ret.Rows.
Count
);
1102
Assert.Equal(12, df.Rows.
Count
);
1107
Assert.Equal(13, ret.Rows.
Count
);
1112
Assert.Equal(13, df.Rows.
Count
);
1116
Assert.Equal(14, ret.Rows.
Count
);
1121
Assert.Equal(14, df.Rows.
Count
);
1125
Assert.Equal(15, ret.Rows.
Count
);
1130
Assert.Equal(15, df.Rows.
Count
);
1137
Assert.Equal(16, ret.Rows.
Count
);
1145
Assert.Equal(16, df.Rows.
Count
);
1151
Assert.Equal(17, ret.Rows.
Count
);
1158
Assert.Equal(17, df.Rows.
Count
);
1164
Assert.Equal(18, ret.Rows.
Count
);
1176
Assert.Equal(18, df.Rows.
Count
);
1183
Assert.Equal(18, df.Rows.
Count
);
1188
Assert.Equal(19, ret.Rows.
Count
);
1200
Assert.Equal(11, df.Rows.
Count
);
1208
Assert.Equal(12, df.Rows.
Count
);
1214
Assert.Equal(13, df.Rows.
Count
);
1390
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)
523
Assert.Equal(2, filteredNullDf.Rows.
Count
);