239 references to Rows
Microsoft.Data.Analysis (40)
DataFrame.Arrow.cs (2)
189
int numberOfRowsInThisRecordBatch = (int)Math.Min(recordBatchLength,
Rows
.Count);
207
} while (numberOfRowsProcessed <
Rows
.Count);
DataFrame.cs (13)
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);
724
foreach (object obj in
Rows
[i])
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.IO.cs (2)
165
foreach (var row in
Rows
)
682
foreach (var row in dataFrame.
Rows
)
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);
GroupBy.cs (1)
503
return _keyToRowIndicesMap.Select(kvp => new Grouping(kvp.Key, kvp.Value.Select(index => _dataFrame.
Rows
[index])));
Microsoft.Data.Analysis.Interactive (7)
DataFrameKernelExtension.cs (7)
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);
64
foreach (var obj in df.
Rows
[index])
111
for (var index = 0; index < df.
Rows
.Count; index++)
117
foreach (var obj in df.
Rows
[index])
Microsoft.Data.Analysis.Tests (188)
ArrowIntegrationTests.cs (1)
217
Assert.Equal(0, emptyDataFrame.
Rows
.Count);
DataFrame.IOTests.cs (48)
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);
485
var nullRow = df.
Rows
[3];
513
Assert.Equal(5, df.
Rows
.Count);
549
var nullRow = df.
Rows
[3];
590
Assert.Equal(5, df.
Rows
.Count);
596
Assert.Equal(3, reducedRows.
Rows
.Count);
601
var nullRow = df.
Rows
[3];
629
Assert.Equal(5, df.
Rows
.Count);
635
Assert.Equal(3, reducedRows.
Rows
.Count);
640
var nullRow = df.
Rows
[3];
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);
865
var nullRow = df.
Rows
[3];
871
nullRow = df.
Rows
[4];
902
Assert.Equal(6, df.
Rows
.Count);
927
var nullRow = df.
Rows
[3];
933
nullRow = df.
Rows
[4];
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);
1159
var nullRow = df.
Rows
[3];
1162
nullRow = df.
Rows
[4];
1230
var resVals = dataFrame.
Rows
.Select(row => row.ToArray()).ToArray();
1308
Assert.Equal(_rowCount, df.
Rows
.Count);
1322
Assert.Equal(_cells[i], df.
Rows
[i]);
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 (64)
30
Assert.Equal(14, (int)headList.
Rows
[4][1]);
33
Assert.Equal(19, (int)tailList.
Rows
[4][1]);
38
var row = dataFrame.
Rows
[4];
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++)
964
DataFrameRowCollection rows = df.
Rows
;
980
Assert.Equal(df.
Rows
.Count, rowCount);
995
DataFrameRowCollection rows = df.
Rows
;
1020
Assert.Equal(10, df.
Rows
.Count);
1024
DataFrame ret = df.Append(df2.
Rows
, inPlace: false);
1025
Assert.Equal(10, df.
Rows
.Count);
1033
Assert.Equal(15, ret.
Rows
.Count);
1036
for (long i = 0; i < ret.
Rows
.Count; i++)
1038
DataFrameRow row = ret.
Rows
[i];
1041
if (i < check1.
Rows
.Count)
1043
Assert.Equal(row[j], check1.
Rows
[i][j]);
1047
Assert.Equal(row[j]?.ToString(), (check2.
Rows
[i - check1.
Rows
.Count][j])?.ToString());
1054
df.Append(df2.
Rows
, inPlace: true);
1072
var resultDataFrame = dataFrame.Append(dataFrame2.
Rows
);
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 (26)
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);
109
DataFrameRow dataFrameMergeRow = merge.
Rows
[mergeRow];
118
compare = left.
Rows
[leftRow.Value][columnIndex];
126
compare = right.
Rows
[rightRow.Value][rightColumnIndex];
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 (9)
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);
Microsoft.ML.Fairlearn (4)
Metrics\FairlearnMetricCatalog.cs (1)
186
var groups = evalDf.
Rows
.GroupBy(r => r[sensitiveCol.Index]);
Reductions\UtilityParity.cs (3)
125
gSigned.Append(dfNeg.
Rows
, inPlace: true);
150
long dataSetLength = Tags.
Rows
.Count();
154
foreach (DataFrameRow row in Tags.
Rows
)