113 instantiations of DataFrame
Microsoft.Data.Analysis (60)
DataFrame.Arrow.cs (1)
157
DataFrame ret = new
DataFrame
();
DataFrame.BinaryOperations.cs (38)
22
DataFrame retDataFrame = inPlace ? this : new
DataFrame
();
41
DataFrame retDataFrame = inPlace ? this : new
DataFrame
();
61
DataFrame retDataFrame = inPlace ? this : new
DataFrame
();
80
DataFrame retDataFrame = inPlace ? this : new
DataFrame
();
100
DataFrame retDataFrame = inPlace ? this : new
DataFrame
();
119
DataFrame retDataFrame = inPlace ? this : new
DataFrame
();
139
DataFrame retDataFrame = inPlace ? this : new
DataFrame
();
158
DataFrame retDataFrame = inPlace ? this : new
DataFrame
();
178
DataFrame retDataFrame = inPlace ? this : new
DataFrame
();
197
DataFrame retDataFrame = inPlace ? this : new
DataFrame
();
216
DataFrame retDataFrame = inPlace ? this : new
DataFrame
();
234
DataFrame retDataFrame = inPlace ? this : new
DataFrame
();
253
DataFrame retDataFrame = inPlace ? this : new
DataFrame
();
271
DataFrame retDataFrame = inPlace ? this : new
DataFrame
();
290
DataFrame retDataFrame = inPlace ? this : new
DataFrame
();
308
DataFrame retDataFrame = inPlace ? this : new
DataFrame
();
326
DataFrame retDataFrame = inPlace ? this : new
DataFrame
();
344
DataFrame retDataFrame = inPlace ? this : new
DataFrame
();
364
DataFrame retDataFrame = new
DataFrame
();
380
DataFrame retDataFrame = new
DataFrame
();
397
DataFrame retDataFrame = new
DataFrame
();
413
DataFrame retDataFrame = new
DataFrame
();
430
DataFrame retDataFrame = new
DataFrame
();
446
DataFrame retDataFrame = new
DataFrame
();
463
DataFrame retDataFrame = new
DataFrame
();
479
DataFrame retDataFrame = new
DataFrame
();
496
DataFrame retDataFrame = new
DataFrame
();
512
DataFrame retDataFrame = new
DataFrame
();
529
DataFrame retDataFrame = new
DataFrame
();
545
DataFrame retDataFrame = new
DataFrame
();
562
DataFrame retDataFrame = inPlace ? this : new
DataFrame
();
580
DataFrame retDataFrame = inPlace ? this : new
DataFrame
();
598
DataFrame retDataFrame = inPlace ? this : new
DataFrame
();
616
DataFrame retDataFrame = inPlace ? this : new
DataFrame
();
634
DataFrame retDataFrame = inPlace ? this : new
DataFrame
();
651
DataFrame retDataFrame = inPlace ? this : new
DataFrame
();
668
DataFrame retDataFrame = inPlace ? this : new
DataFrame
();
685
DataFrame retDataFrame = inPlace ? this : new
DataFrame
();
DataFrame.cs (4)
205
return new
DataFrame
(newColumns);
213
DataFrame ret = new
DataFrame
();
236
DataFrame ret = new
DataFrame
();
691
return new
DataFrame
(newColumns);
DataFrame.IO.cs (3)
132
var res = new
DataFrame
(columns);
195
var res = new
DataFrame
(columns);
450
DataFrame ret = new
DataFrame
(columns);
DataFrame.Join.cs (2)
49
DataFrame ret = new
DataFrame
();
404
DataFrame ret = new
DataFrame
();
DataFrameColumns\StringDataFrameColumn.cs (1)
393
return new
DataFrame
(new List<DataFrameColumn> { keys, counts });
GroupBy.cs (9)
144
DataFrame ret = new
DataFrame
();
187
DataFrame ret = new
DataFrame
();
229
DataFrame ret = new
DataFrame
();
283
DataFrame ret = new
DataFrame
();
357
DataFrame ret = new
DataFrame
();
385
DataFrame ret = new
DataFrame
();
413
DataFrame ret = new
DataFrame
();
441
DataFrame ret = new
DataFrame
();
469
DataFrame ret = new
DataFrame
();
IDataView.Extension.cs (1)
148
return new
DataFrame
(dataFrameColumns);
PrimitiveDataFrameColumn.cs (1)
391
return new
DataFrame
(new List<DataFrameColumn> { keys, counts });
Microsoft.Data.Analysis.Interactive (1)
TabularDataResourceExtensions.cs (1)
22
var dataFrame = new
DataFrame
();
Microsoft.Data.Analysis.Interactive.Tests (1)
DataFrameInteractiveTests.cs (1)
29
DataFrame dataFrame = new
DataFrame
();
Microsoft.Data.Analysis.Tests (37)
ArrowIntegrationTests.cs (1)
146
DataFrame df = new
DataFrame
(new List<DataFrameColumn>() { ageColumn, lengthColumn, stringColumn });
DataFrame.IOTests.cs (1)
962
DataFrame dataFrame = new
DataFrame
(vBufferColumn);
DataFrameTests.BinaryOperations.cs (4)
173
var df = new
DataFrame
();
205
var df = new
DataFrame
();
247
var df = new
DataFrame
();
303
var df = new
DataFrame
();
DataFrameTests.Computations.cs (2)
484
var dfTest = new
DataFrame
(col1, col2);
501
var dfTest = new
DataFrame
(col1, col2);
DataFrameTests.cs (10)
65
DataFrame dataFrame = new
DataFrame
();
108
DataFrame dataFrame1 = new
DataFrame
(intColumn, floatColumn);
151
DataFrame dataFrame = new
DataFrame
();
185
DataFrame dataframe = new
DataFrame
(city, temp);
204
DataFrame dataframe = new
DataFrame
(city, temp);
800
DataFrame df = new
DataFrame
();
1061
var dataFrame = new
DataFrame
(
1067
var dataFrame2 = new
DataFrame
(
1366
var dfTest = new
DataFrame
(col);
1383
var dfTest = new
DataFrame
(index, col);
DataFrameTests.Merge.cs (14)
298
var left = new
DataFrame
();
303
var right = new
DataFrame
();
364
var left = new
DataFrame
();
369
var right = new
DataFrame
();
422
var left = new
DataFrame
();
427
var right = new
DataFrame
();
480
var left = new
DataFrame
();
485
var right = new
DataFrame
();
536
var left = new
DataFrame
();
541
var right = new
DataFrame
();
596
var left = new
DataFrame
();
602
var right = new
DataFrame
();
652
var left = new
DataFrame
();
658
var right = new
DataFrame
();
DataFrameTests.Utils.cs (3)
26
DataFrame dataFrame = new
DataFrame
();
190
var dataFrame = new
DataFrame
(columnsList);
209
DataFrame dataFrame = new
DataFrame
(new List<DataFrameColumn> { baseColumn1, baseColumn2 });
PrimitiveDataFrameColumnTests.cs (2)
499
var dfTest = new
DataFrame
(col);
516
var dfTest = new
DataFrame
(index, col);
Microsoft.ML.AutoML.Interactive (1)
NotebookMonitor.cs (1)
30
TrialData = new
DataFrame
(new PrimitiveDataFrameColumn<int>("Trial"), new PrimitiveDataFrameColumn<float>("Metric"), new StringDataFrameColumn("Trainer"), new StringDataFrameColumn("Parameters"));
Microsoft.ML.Fairlearn (9)
Metrics\FairlearnMetricCatalog.cs (3)
99
DataFrame result = new
DataFrame
();
190
var data = new
DataFrame
(_eval.Schema.AsEnumerable().Select<DataViewSchema.Column, DataFrameColumn>(column =>
233
DataFrame result = new
DataFrame
();
Reductions\GridSearchTrialRunner.cs (2)
72
var df = new
DataFrame
();
78
trainDataset = ZipDataView.Create(_context, new IDataView[] { trainDataset, new
DataFrame
(signWeightColumn) });
Reductions\Moment.cs (1)
49
Tags = new
DataFrame
();
Reductions\UtilityParity.cs (3)
114
DataFrame gSigned = new
DataFrame
(posSign, groupID, upperBoundDiff);
121
DataFrame dfNeg = new
DataFrame
(negSign, groupID, lowerBoundDiff);
147
DataFrame lookUp = new
DataFrame
(gPos["group_id"], adjust);
Microsoft.ML.Fairlearn.Tests (4)
GridSearchTest.cs (2)
38
var df = new
DataFrame
();
62
var df = new
DataFrame
();
MetricTest.cs (1)
69
DataFrame df = new
DataFrame
(label, groupId, pred, score, prob);
UtilityTest.cs (1)
27
DataFrame x = new
DataFrame
();
892 references to DataFrame
Microsoft.Data.Analysis (462)
DataFrame.Arrow.cs (5)
14
private static void AppendDataFrameColumnFromArrowArray(Field field, IArrowArray arrowArray,
DataFrame
ret, string fieldNamePrefix = "")
151
/// Wraps a <see cref="
DataFrame
"/> around an Arrow <see cref="RecordBatch"/> without copying data
154
/// <returns><see cref="
DataFrame
"/></returns>
155
public static
DataFrame
FromArrowRecordBatch(RecordBatch recordBatch)
157
DataFrame
ret = new DataFrame();
DataFrame.BinaryOperations.cs (76)
15
public
DataFrame
Add<T>(IReadOnlyList<T> values, bool inPlace = false)
22
DataFrame
retDataFrame = inPlace ? this : new DataFrame();
38
public
DataFrame
Add<T>(T value, bool inPlace = false)
41
DataFrame
retDataFrame = inPlace ? this : new DataFrame();
54
public
DataFrame
Subtract<T>(IReadOnlyList<T> values, bool inPlace = false)
61
DataFrame
retDataFrame = inPlace ? this : new DataFrame();
77
public
DataFrame
Subtract<T>(T value, bool inPlace = false)
80
DataFrame
retDataFrame = inPlace ? this : new DataFrame();
93
public
DataFrame
Multiply<T>(IReadOnlyList<T> values, bool inPlace = false)
100
DataFrame
retDataFrame = inPlace ? this : new DataFrame();
116
public
DataFrame
Multiply<T>(T value, bool inPlace = false)
119
DataFrame
retDataFrame = inPlace ? this : new DataFrame();
132
public
DataFrame
Divide<T>(IReadOnlyList<T> values, bool inPlace = false)
139
DataFrame
retDataFrame = inPlace ? this : new DataFrame();
155
public
DataFrame
Divide<T>(T value, bool inPlace = false)
158
DataFrame
retDataFrame = inPlace ? this : new DataFrame();
171
public
DataFrame
Modulo<T>(IReadOnlyList<T> values, bool inPlace = false)
178
DataFrame
retDataFrame = inPlace ? this : new DataFrame();
194
public
DataFrame
Modulo<T>(T value, bool inPlace = false)
197
DataFrame
retDataFrame = inPlace ? this : new DataFrame();
210
public
DataFrame
And(IReadOnlyList<bool> values, bool inPlace = false)
216
DataFrame
retDataFrame = inPlace ? this : new DataFrame();
232
public
DataFrame
And(bool value, bool inPlace = false)
234
DataFrame
retDataFrame = inPlace ? this : new DataFrame();
247
public
DataFrame
Or(IReadOnlyList<bool> values, bool inPlace = false)
253
DataFrame
retDataFrame = inPlace ? this : new DataFrame();
269
public
DataFrame
Or(bool value, bool inPlace = false)
271
DataFrame
retDataFrame = inPlace ? this : new DataFrame();
284
public
DataFrame
Xor(IReadOnlyList<bool> values, bool inPlace = false)
290
DataFrame
retDataFrame = inPlace ? this : new DataFrame();
306
public
DataFrame
Xor(bool value, bool inPlace = false)
308
DataFrame
retDataFrame = inPlace ? this : new DataFrame();
324
public
DataFrame
LeftShift(int value, bool inPlace = false)
326
DataFrame
retDataFrame = inPlace ? this : new DataFrame();
342
public
DataFrame
RightShift(int value, bool inPlace = false)
344
DataFrame
retDataFrame = inPlace ? this : new DataFrame();
357
public
DataFrame
ElementwiseEquals<T>(IReadOnlyList<T> values)
364
DataFrame
retDataFrame = new DataFrame();
377
public
DataFrame
ElementwiseEquals<T>(T value)
380
DataFrame
retDataFrame = new DataFrame();
390
public
DataFrame
ElementwiseNotEquals<T>(IReadOnlyList<T> values)
397
DataFrame
retDataFrame = new DataFrame();
410
public
DataFrame
ElementwiseNotEquals<T>(T value)
413
DataFrame
retDataFrame = new DataFrame();
423
public
DataFrame
ElementwiseGreaterThanOrEqual<T>(IReadOnlyList<T> values)
430
DataFrame
retDataFrame = new DataFrame();
443
public
DataFrame
ElementwiseGreaterThanOrEqual<T>(T value)
446
DataFrame
retDataFrame = new DataFrame();
456
public
DataFrame
ElementwiseLessThanOrEqual<T>(IReadOnlyList<T> values)
463
DataFrame
retDataFrame = new DataFrame();
476
public
DataFrame
ElementwiseLessThanOrEqual<T>(T value)
479
DataFrame
retDataFrame = new DataFrame();
489
public
DataFrame
ElementwiseGreaterThan<T>(IReadOnlyList<T> values)
496
DataFrame
retDataFrame = new DataFrame();
509
public
DataFrame
ElementwiseGreaterThan<T>(T value)
512
DataFrame
retDataFrame = new DataFrame();
522
public
DataFrame
ElementwiseLessThan<T>(IReadOnlyList<T> values)
529
DataFrame
retDataFrame = new DataFrame();
542
public
DataFrame
ElementwiseLessThan<T>(T value)
545
DataFrame
retDataFrame = new DataFrame();
559
public
DataFrame
ReverseAdd<T>(T value, bool inPlace = false)
562
DataFrame
retDataFrame = inPlace ? this : new DataFrame();
577
public
DataFrame
ReverseSubtract<T>(T value, bool inPlace = false)
580
DataFrame
retDataFrame = inPlace ? this : new DataFrame();
595
public
DataFrame
ReverseMultiply<T>(T value, bool inPlace = false)
598
DataFrame
retDataFrame = inPlace ? this : new DataFrame();
613
public
DataFrame
ReverseDivide<T>(T value, bool inPlace = false)
616
DataFrame
retDataFrame = inPlace ? this : new DataFrame();
631
public
DataFrame
ReverseModulo<T>(T value, bool inPlace = false)
634
DataFrame
retDataFrame = inPlace ? this : new DataFrame();
649
public
DataFrame
ReverseAnd(bool value, bool inPlace = false)
651
DataFrame
retDataFrame = inPlace ? this : new DataFrame();
666
public
DataFrame
ReverseOr(bool value, bool inPlace = false)
668
DataFrame
retDataFrame = inPlace ? this : new DataFrame();
683
public
DataFrame
ReverseXor(bool value, bool inPlace = false)
685
DataFrame
retDataFrame = inPlace ? this : new DataFrame();
DataFrame.BinaryOperators.cs (224)
16
public static
DataFrame
operator +(
DataFrame
df, byte value)
21
public static
DataFrame
operator +(byte value,
DataFrame
df)
26
public static
DataFrame
operator +(
DataFrame
df, decimal value)
31
public static
DataFrame
operator +(decimal value,
DataFrame
df)
36
public static
DataFrame
operator +(
DataFrame
df, double value)
41
public static
DataFrame
operator +(double value,
DataFrame
df)
46
public static
DataFrame
operator +(
DataFrame
df, float value)
51
public static
DataFrame
operator +(float value,
DataFrame
df)
56
public static
DataFrame
operator +(
DataFrame
df, int value)
61
public static
DataFrame
operator +(int value,
DataFrame
df)
66
public static
DataFrame
operator +(
DataFrame
df, long value)
71
public static
DataFrame
operator +(long value,
DataFrame
df)
76
public static
DataFrame
operator +(
DataFrame
df, sbyte value)
81
public static
DataFrame
operator +(sbyte value,
DataFrame
df)
86
public static
DataFrame
operator +(
DataFrame
df, short value)
91
public static
DataFrame
operator +(short value,
DataFrame
df)
96
public static
DataFrame
operator +(
DataFrame
df, uint value)
101
public static
DataFrame
operator +(uint value,
DataFrame
df)
106
public static
DataFrame
operator +(
DataFrame
df, ulong value)
111
public static
DataFrame
operator +(ulong value,
DataFrame
df)
116
public static
DataFrame
operator +(
DataFrame
df, ushort value)
121
public static
DataFrame
operator +(ushort value,
DataFrame
df)
126
public static
DataFrame
operator -(
DataFrame
df, byte value)
131
public static
DataFrame
operator -(byte value,
DataFrame
df)
136
public static
DataFrame
operator -(
DataFrame
df, decimal value)
141
public static
DataFrame
operator -(decimal value,
DataFrame
df)
146
public static
DataFrame
operator -(
DataFrame
df, double value)
151
public static
DataFrame
operator -(double value,
DataFrame
df)
156
public static
DataFrame
operator -(
DataFrame
df, float value)
161
public static
DataFrame
operator -(float value,
DataFrame
df)
166
public static
DataFrame
operator -(
DataFrame
df, int value)
171
public static
DataFrame
operator -(int value,
DataFrame
df)
176
public static
DataFrame
operator -(
DataFrame
df, long value)
181
public static
DataFrame
operator -(long value,
DataFrame
df)
186
public static
DataFrame
operator -(
DataFrame
df, sbyte value)
191
public static
DataFrame
operator -(sbyte value,
DataFrame
df)
196
public static
DataFrame
operator -(
DataFrame
df, short value)
201
public static
DataFrame
operator -(short value,
DataFrame
df)
206
public static
DataFrame
operator -(
DataFrame
df, uint value)
211
public static
DataFrame
operator -(uint value,
DataFrame
df)
216
public static
DataFrame
operator -(
DataFrame
df, ulong value)
221
public static
DataFrame
operator -(ulong value,
DataFrame
df)
226
public static
DataFrame
operator -(
DataFrame
df, ushort value)
231
public static
DataFrame
operator -(ushort value,
DataFrame
df)
236
public static
DataFrame
operator *(
DataFrame
df, byte value)
241
public static
DataFrame
operator *(byte value,
DataFrame
df)
246
public static
DataFrame
operator *(
DataFrame
df, decimal value)
251
public static
DataFrame
operator *(decimal value,
DataFrame
df)
256
public static
DataFrame
operator *(
DataFrame
df, double value)
261
public static
DataFrame
operator *(double value,
DataFrame
df)
266
public static
DataFrame
operator *(
DataFrame
df, float value)
271
public static
DataFrame
operator *(float value,
DataFrame
df)
276
public static
DataFrame
operator *(
DataFrame
df, int value)
281
public static
DataFrame
operator *(int value,
DataFrame
df)
286
public static
DataFrame
operator *(
DataFrame
df, long value)
291
public static
DataFrame
operator *(long value,
DataFrame
df)
296
public static
DataFrame
operator *(
DataFrame
df, sbyte value)
301
public static
DataFrame
operator *(sbyte value,
DataFrame
df)
306
public static
DataFrame
operator *(
DataFrame
df, short value)
311
public static
DataFrame
operator *(short value,
DataFrame
df)
316
public static
DataFrame
operator *(
DataFrame
df, uint value)
321
public static
DataFrame
operator *(uint value,
DataFrame
df)
326
public static
DataFrame
operator *(
DataFrame
df, ulong value)
331
public static
DataFrame
operator *(ulong value,
DataFrame
df)
336
public static
DataFrame
operator *(
DataFrame
df, ushort value)
341
public static
DataFrame
operator *(ushort value,
DataFrame
df)
346
public static
DataFrame
operator /(
DataFrame
df, byte value)
351
public static
DataFrame
operator /(byte value,
DataFrame
df)
356
public static
DataFrame
operator /(
DataFrame
df, decimal value)
361
public static
DataFrame
operator /(decimal value,
DataFrame
df)
366
public static
DataFrame
operator /(
DataFrame
df, double value)
371
public static
DataFrame
operator /(double value,
DataFrame
df)
376
public static
DataFrame
operator /(
DataFrame
df, float value)
381
public static
DataFrame
operator /(float value,
DataFrame
df)
386
public static
DataFrame
operator /(
DataFrame
df, int value)
391
public static
DataFrame
operator /(int value,
DataFrame
df)
396
public static
DataFrame
operator /(
DataFrame
df, long value)
401
public static
DataFrame
operator /(long value,
DataFrame
df)
406
public static
DataFrame
operator /(
DataFrame
df, sbyte value)
411
public static
DataFrame
operator /(sbyte value,
DataFrame
df)
416
public static
DataFrame
operator /(
DataFrame
df, short value)
421
public static
DataFrame
operator /(short value,
DataFrame
df)
426
public static
DataFrame
operator /(
DataFrame
df, uint value)
431
public static
DataFrame
operator /(uint value,
DataFrame
df)
436
public static
DataFrame
operator /(
DataFrame
df, ulong value)
441
public static
DataFrame
operator /(ulong value,
DataFrame
df)
446
public static
DataFrame
operator /(
DataFrame
df, ushort value)
451
public static
DataFrame
operator /(ushort value,
DataFrame
df)
456
public static
DataFrame
operator %(
DataFrame
df, byte value)
461
public static
DataFrame
operator %(byte value,
DataFrame
df)
466
public static
DataFrame
operator %(
DataFrame
df, decimal value)
471
public static
DataFrame
operator %(decimal value,
DataFrame
df)
476
public static
DataFrame
operator %(
DataFrame
df, double value)
481
public static
DataFrame
operator %(double value,
DataFrame
df)
486
public static
DataFrame
operator %(
DataFrame
df, float value)
491
public static
DataFrame
operator %(float value,
DataFrame
df)
496
public static
DataFrame
operator %(
DataFrame
df, int value)
501
public static
DataFrame
operator %(int value,
DataFrame
df)
506
public static
DataFrame
operator %(
DataFrame
df, long value)
511
public static
DataFrame
operator %(long value,
DataFrame
df)
516
public static
DataFrame
operator %(
DataFrame
df, sbyte value)
521
public static
DataFrame
operator %(sbyte value,
DataFrame
df)
526
public static
DataFrame
operator %(
DataFrame
df, short value)
531
public static
DataFrame
operator %(short value,
DataFrame
df)
536
public static
DataFrame
operator %(
DataFrame
df, uint value)
541
public static
DataFrame
operator %(uint value,
DataFrame
df)
546
public static
DataFrame
operator %(
DataFrame
df, ulong value)
551
public static
DataFrame
operator %(ulong value,
DataFrame
df)
556
public static
DataFrame
operator %(
DataFrame
df, ushort value)
561
public static
DataFrame
operator %(ushort value,
DataFrame
df)
566
public static
DataFrame
operator <<(
DataFrame
df, int value)
571
public static
DataFrame
operator >>(
DataFrame
df, int value)
DataFrame.cs (53)
41
/// Constructs a <see cref="
DataFrame
"/> with <paramref name="columns"/>.
43
/// <param name="columns">The columns of this <see cref="
DataFrame
"/>.</param>
57
/// Returns the columns contained in the <see cref="
DataFrame
"/> as a <see cref="DataFrameColumnCollection"/>
62
/// Returns a <see cref="DataFrameRowCollection"/> that contains a view of the rows in this <see cref="
DataFrame
"/>
85
public
DataFrame
Filter(PrimitiveDataFrameColumn<bool> filter) => Clone(filter);
91
public
DataFrame
Filter(PrimitiveDataFrameColumn<int> rowIndices) => Clone(rowIndices);
97
public
DataFrame
Filter(PrimitiveDataFrameColumn<long> rowIndices) => Clone(rowIndices);
103
public
DataFrame
this[PrimitiveDataFrameColumn<bool> rowFilter] => Filter(rowFilter);
109
public
DataFrame
this[PrimitiveDataFrameColumn<int> rowIndices] => Filter(rowIndices);
115
public
DataFrame
this[PrimitiveDataFrameColumn<long> rowIndices] => Filter(rowIndices);
120
public
DataFrame
this[IEnumerable<int> rowIndices]
132
public
DataFrame
this[IEnumerable<long> rowIndices]
144
public
DataFrame
this[IEnumerable<bool> rowFilter]
158
/// <exception cref="ArgumentException">Throws if <paramref name="columnName"/> is not present in this <see cref="
DataFrame
"/></exception>
169
public
DataFrame
Head(int numberOfRows)
178
public
DataFrame
Tail(int numberOfRows)
193
public
DataFrame
Clone()
198
private
DataFrame
Clone(DataFrameColumn mapIndices = null)
211
public
DataFrame
Info()
213
DataFrame
ret = new DataFrame();
234
public
DataFrame
Description()
236
DataFrame
ret = new DataFrame();
266
public
DataFrame
OrderBy(string columnName, bool ascending = true, bool putNullValuesLast = true)
276
public
DataFrame
OrderByDescending(string columnName, bool putNullValuesLast = true)
288
public
DataFrame
Clamp<U>(U min, U max, bool inPlace = false)
290
DataFrame
ret = inPlace ? this : Clone();
304
public
DataFrame
AddPrefix(string prefix, bool inPlace = false)
306
DataFrame
df = inPlace ? this : Clone();
319
public
DataFrame
AddSuffix(string suffix, bool inPlace = false)
321
DataFrame
df = inPlace ? this : Clone();
335
public
DataFrame
Sample(int numberOfRows)
363
/// Groups the rows of the <see cref="
DataFrame
"/> by unique values in the <paramref name="columnName"/> column.
378
/// Groups the rows of the <see cref="
DataFrame
"/> by unique values in the <paramref name="columnName"/> column.
412
public
DataFrame
DropNulls(DropNullOptions options = DropNullOptions.Any)
464
/// <returns>A new <see cref="
DataFrame
"/> if <paramref name="inPlace"/> is not set. Returns this <see cref="
DataFrame
"/> otherwise.</returns>
465
public
DataFrame
FillNulls(object value, bool inPlace = false)
467
DataFrame
ret = inPlace ? this : Clone();
478
/// <param name="values">The values to replace <see langword="null" /> with, one value per column. Should be equal to the number of columns in this <see cref="
DataFrame
"/>. </param>
480
/// <returns>A new <see cref="
DataFrame
"/> if <paramref name="inPlace"/> is not set. Returns this <see cref="
DataFrame
"/> otherwise.</returns>
481
public
DataFrame
FillNulls(IList<object> values, bool inPlace = false)
486
DataFrame
ret = inPlace ? this : Clone();
510
public
DataFrame
Append(IEnumerable<DataFrameRow> rows, bool inPlace = false, CultureInfo cultureInfo = null)
512
DataFrame
ret = inPlace ? this : Clone();
528
public
DataFrame
Append(IEnumerable<object> row = null, bool inPlace = false, CultureInfo cultureInfo = null)
535
DataFrame
ret = inPlace ? this : Clone();
611
public
DataFrame
Append(IEnumerable<KeyValuePair<string, object>> row, bool inPlace = false, CultureInfo cultureInfo = null)
618
DataFrame
ret = inPlace ? this : Clone();
678
private
DataFrame
Sort(string columnName, bool ascending, bool putNullValuesLast)
695
/// A preview of the contents of this <see cref="
DataFrame
"/> as a string.
697
/// <returns>A preview of the contents of this <see cref="
DataFrame
"/>.</returns>
701
/// A preview of the contents of this <see cref="
DataFrame
"/> as a string.
DataFrame.IDataView.cs (2)
72
private readonly
DataFrame
_dataFrame;
75
public RowCursor(
DataFrame
dataFrame, bool[] activeColumns)
DataFrame.IO.cs (22)
106
public static
DataFrame
LoadCsv(string filename,
121
public static
DataFrame
LoadFrom(IEnumerable<IList<object>> vals, IList<(string, Type)> columnInfos)
132
var
res = new DataFrame(columns);
182
public static
DataFrame
FromSchema(DbDataReader reader)
195
var
res = new DataFrame(columns);
199
public static async Task<
DataFrame
> LoadFrom(DbDataReader reader)
201
var
res = FromSchema(reader);
221
public static async Task<
DataFrame
> LoadFrom(DbDataAdapter adapter)
355
private static
DataFrame
ReadCsvLinesIntoDataFrame(WrappedStreamReaderOrStringReader wrappedReader,
450
DataFrame
ret = new DataFrame(columns);
539
/// <returns><see cref="
DataFrame
"/></returns>
540
public static
DataFrame
LoadCsvFromString(string csvString,
566
/// <returns><see cref="
DataFrame
"/></returns>
567
public static
DataFrame
LoadCsv(Stream csvStream,
591
/// <param name="dataFrame"><see cref="
DataFrame
"/></param>
598
public static void WriteCsv(
DataFrame
dataFrame, string path,
608
/// <param name="dataFrame"><see cref="
DataFrame
"/></param>
614
public static void SaveCsv(
DataFrame
dataFrame, string path,
629
/// <param name="dataFrame"><see cref="
DataFrame
"/></param>
636
public static void WriteCsv(
DataFrame
dataFrame, Stream csvStream,
646
/// <param name="dataFrame"><see cref="
DataFrame
"/></param>
652
public static void SaveCsv(
DataFrame
dataFrame, Stream csvStream,
DataFrame.Join.cs (20)
26
private void SetSuffixForDuplicatedColumnNames(
DataFrame
dataFrame, DataFrameColumn column, string leftSuffix, string rightSuffix)
40
/// Joins columns of another <see cref="
DataFrame
"/>
42
/// <param name="other">The other <see cref="
DataFrame
"/> to join.</param>
43
/// <param name="leftSuffix">The suffix to add to this <see cref="
DataFrame
"/>'s column if there are common column names</param>
46
/// <returns>A new <see cref="
DataFrame
"/></returns>
47
public
DataFrame
Join(
DataFrame
other, string leftSuffix = "_left", string rightSuffix = "_right", JoinAlgorithm joinAlgorithm = JoinAlgorithm.Left)
49
DataFrame
ret = new DataFrame();
166
public
DataFrame
Merge<TKey>(
DataFrame
other, string leftJoinColumn, string rightJoinColumn, string leftSuffix = "_left", string rightSuffix = "_right", JoinAlgorithm joinAlgorithm = JoinAlgorithm.Left)
171
private static HashSet<long> Merge(
DataFrame
retainedDataFrame,
DataFrame
supplementaryDataFrame,
192
private static Dictionary<long, ICollection<long>> GetOccurences(
DataFrame
retainedDataFrame,
DataFrame
supplementaryDataFrame,
275
private static HashSet<long> PerformMerging(
DataFrame
retainedDataFrame, string[] retainedJoinColumnNames,
331
public
DataFrame
Merge(
DataFrame
other, string[] leftJoinColumns, string[] rightJoinColumns, string leftSuffix = "_left", string rightSuffix = "_right", JoinAlgorithm joinAlgorithm = JoinAlgorithm.Left)
341
DataFrame
supplementaryDataFrame;
342
DataFrame
retainedDataFrame;
404
DataFrame
ret = new DataFrame();
DataFrameColumn.cs (4)
141
public void SetName(string newName,
DataFrame
dataFrame) => SetName(newName);
298
public virtual
DataFrame
ValueCounts() => throw new NotImplementedException();
300
public virtual GroupBy GroupBy(int columnIndex,
DataFrame
parent) => throw new NotImplementedException();
434
return ToString(
DataFrame
.DefaultMaxRowsToShowInPreview);
DataFrameColumnCollection.cs (1)
180
/// <exception cref="ArgumentException">Throws if <paramref name="columnName"/> is not present in this <see cref="
DataFrame
"/></exception>
DataFrameColumns\ArrowStringDataFrameColumn.cs (2)
475
public override
DataFrame
ValueCounts()
482
public override GroupBy GroupBy(int columnIndex,
DataFrame
parent)
DataFrameColumns\StringDataFrameColumn.cs (3)
384
internal static
DataFrame
ValueCountsImplementation(Dictionary<string, ICollection<long>> groupedValues)
396
public override
DataFrame
ValueCounts()
402
public override GroupBy GroupBy(int columnIndex,
DataFrame
parent)
DataFrameRow.cs (3)
15
/// A DataFrameRow is a collection of values that represent a row in a <see cref="
DataFrame
"/>.
19
private readonly
DataFrame
_dataFrame;
22
internal DataFrameRow(
DataFrame
df, long rowIndex)
DataFrameRowCollection.cs (4)
12
/// Represents the rows of a <see cref="
DataFrame
"/>
16
private readonly
DataFrame
_dataFrame;
21
internal DataFrameRowCollection(
DataFrame
dataFrame)
50
/// The number of rows in this <see cref="
DataFrame
"/>.
GroupBy.cs (30)
22
public abstract
DataFrame
Count(params string[] columnNames);
28
public abstract
DataFrame
First(params string[] columnNames);
35
public abstract
DataFrame
Head(int numberOfRows);
42
public abstract
DataFrame
Tail(int numberOfRows);
48
public abstract
DataFrame
Max(params string[] columnNames);
54
public abstract
DataFrame
Min(params string[] columnNames);
60
public abstract
DataFrame
Product(params string[] columnNames);
66
public abstract
DataFrame
Sum(params string[] columnNames);
72
public abstract
DataFrame
Mean(params string[] columnNames);
106
private readonly
DataFrame
_dataFrame;
108
public GroupBy(
DataFrame
dataFrame, int groupByColumnIndex, IDictionary<TKey, ICollection<long>> keyToRowIndices)
142
public override
DataFrame
Count(params string[] columnNames)
144
DataFrame
ret = new DataFrame();
185
public override
DataFrame
First(params string[] columnNames)
187
DataFrame
ret = new DataFrame();
227
public override
DataFrame
Head(int numberOfRows)
229
DataFrame
ret = new DataFrame();
281
public override
DataFrame
Tail(int numberOfRows)
283
DataFrame
ret = new DataFrame();
335
private DataFrameColumn ResizeAndInsertColumn(int columnIndex, long rowIndex, bool firstGroup,
DataFrame
ret, PrimitiveDataFrameColumn<long> empty, Func<string, DataFrameColumn> getColumn = null)
355
public override
DataFrame
Max(params string[] columnNames)
357
DataFrame
ret = new DataFrame();
383
public override
DataFrame
Min(params string[] columnNames)
385
DataFrame
ret = new DataFrame();
411
public override
DataFrame
Product(params string[] columnNames)
413
DataFrame
ret = new DataFrame();
439
public override
DataFrame
Sum(params string[] columnNames)
441
DataFrame
ret = new DataFrame();
467
public override
DataFrame
Mean(params string[] columnNames)
469
DataFrame
ret = new DataFrame();
IDataView.Extension.cs (11)
17
/// Returns a <see cref="Microsoft.Data.Analysis.
DataFrame
"/> from this <paramref name="dataView"/>.
20
/// <param name="maxRows">The max number or rows in the <see cref="Microsoft.Data.Analysis.
DataFrame
"/>. Defaults to 100. Use -1 to construct a DataFrame using all the rows in <paramref name="dataView"/>.</param>
21
/// <returns>A <see cref="Microsoft.Data.Analysis.
DataFrame
"/> with <paramref name="maxRows"/>.</returns>
22
public static
DataFrame
ToDataFrame(this IDataView dataView, long maxRows = defaultMaxRows)
28
/// Returns a <see cref="Microsoft.Data.Analysis.
DataFrame
"/> with the first 100 rows of this <paramref name="dataView"/>.
32
/// <returns>A <see cref="Microsoft.Data.Analysis.
DataFrame
"/> with the selected columns and 100 rows.</returns>
33
public static
DataFrame
ToDataFrame(this IDataView dataView, params string[] selectColumns)
39
/// Returns a <see cref="Microsoft.Data.Analysis.
DataFrame
"/> with the first <paramref name="maxRows"/> of this <paramref name="dataView"/>.
42
/// <param name="maxRows">The max number or rows in the <see cref="Microsoft.Data.Analysis.
DataFrame
"/>. Use -1 to construct a DataFrame using all the rows in <paramref name="dataView"/>.</param>
44
/// <returns>A <see cref="Microsoft.Data.Analysis.
DataFrame
"/> with the selected columns and <paramref name="maxRows"/> rows.</returns>
45
public static
DataFrame
ToDataFrame(this IDataView dataView, long maxRows, params string[] selectColumns)
PrimitiveDataFrameColumn.cs (2)
381
public override
DataFrame
ValueCounts()
607
public override GroupBy GroupBy(int columnIndex,
DataFrame
parent)
Microsoft.Data.Analysis.Interactive (3)
DataFrameKernelExtension.cs (1)
37
Formatter.Register<
DataFrame
>((df, writer) =>
TabularDataResourceExtensions.cs (2)
15
public static
DataFrame
ToDataFrame(this TabularDataResource tabularDataResource)
22
var
dataFrame = new DataFrame();
Microsoft.Data.Analysis.Interactive.Tests (6)
DataFrameInteractiveTests.cs (6)
20
public static
DataFrame
MakeDataFrameWithTwoColumns(int length, bool withNulls = true)
29
DataFrame
dataFrame = new DataFrame();
38
DataFrame
dataFrame = MakeDataFrameWithTwoColumns(length: 5);
49
DataFrame
dataFrame = MakeDataFrameWithTwoColumns(length: 26);
60
DataFrame
dataFrame = MakeDataFrameWithTwoColumns(length: 5);
91
var
dataFrame = tableData.ToDataFrame();
Microsoft.Data.Analysis.Tests (386)
ArrowIntegrationTests.cs (12)
61
DataFrame
df =
DataFrame
.FromArrowRecordBatch(originalBatch);
127
DataFrame
df =
DataFrame
.FromArrowRecordBatch(recordBatch);
146
DataFrame
df = new DataFrame(new List<DataFrameColumn>() { ageColumn, lengthColumn, stringColumn });
176
DataFrame
df =
DataFrame
.FromArrowRecordBatch(originalBatch);
198
DataFrame
df =
DataFrame
.FromArrowRecordBatch(originalBatch);
216
DataFrame
emptyDataFrame =
DataFrame
.FromArrowRecordBatch(batch1);
235
Assert.ThrowsAny<ArgumentException>(() =>
DataFrame
.FromArrowRecordBatch(originalBatch));
DataFrame.IOTests.cs (154)
31
internal static void VerifyColumnTypes(
DataFrame
df, bool testArrowStringColumn = false)
141
var
dataFrame =
DataFrame
.LoadCsvFromString(csv, separator: ',', header: true,
160
void RegularTest(
DataFrame
df)
167
DataFrame
df =
DataFrame
.LoadCsv(GetStream(data));
169
DataFrame
csvDf =
DataFrame
.LoadCsvFromString(data);
172
void ReducedRowsTest(
DataFrame
reducedRows)
179
DataFrame
reducedRows =
DataFrame
.LoadCsv(GetStream(data), numberOfRowsToRead: 3);
181
csvDf =
DataFrame
.LoadCsvFromString(data, numberOfRowsToRead: 3);
194
void RegularTest(
DataFrame
df)
213
DataFrame
df =
DataFrame
.LoadCsv(GetStream(data), separator: ';', cultureInfo: cultureInfo);
217
DataFrame
csvDf =
DataFrame
.LoadCsvFromString(data, separator: ';', cultureInfo: cultureInfo);
231
Assert.Throws<System.ArgumentException>(() =>
DataFrame
.LoadCsv(GetStream(data)));
244
DataFrame
df =
DataFrame
.LoadCsv(GetStream(data), renameDuplicatedColumns: true);
273
void RegularTest(
DataFrame
df)
281
DataFrame
df =
DataFrame
.LoadCsv(GetStream(data), header: false);
283
DataFrame
csvDf =
DataFrame
.LoadCsvFromString(data, header: false);
286
void ReducedRowsTest(
DataFrame
reducedRows)
294
DataFrame
reducedRows =
DataFrame
.LoadCsv(GetStream(data), header: false, numberOfRowsToRead: 3);
296
csvDf =
DataFrame
.LoadCsvFromString(data, header: false, numberOfRowsToRead: 3);
312
void RegularTest(
DataFrame
df)
320
DataFrame
df =
DataFrame
.LoadCsv(GetStream(data), header: false);
322
DataFrame
csvDf =
DataFrame
.LoadCsvFromString(data, header: false);
325
void ReducedRowsTest(
DataFrame
reducedRows)
333
DataFrame
reducedRows =
DataFrame
.LoadCsv(GetStream(data), header: false, numberOfRowsToRead: 3);
335
csvDf =
DataFrame
.LoadCsvFromString(data, header: false, numberOfRowsToRead: 3);
339
void VerifyDataFrameWithNamedColumnsAndDataTypes(
DataFrame
df, bool verifyColumnDataType, bool verifyNames)
404
DataFrame
df =
DataFrame
.LoadCsv(GetStream(data),
410
DataFrame
csvDf =
DataFrame
.LoadCsvFromString(data,
419
df =
DataFrame
.LoadCsv(GetStream(data),
424
csvDf =
DataFrame
.LoadCsvFromString(data,
431
Assert.ThrowsAny<ArgumentException>(() =>
DataFrame
.LoadCsv(GetStream(data),
435
Assert.ThrowsAny<ArgumentException>(() =>
DataFrame
.LoadCsvFromString(data,
452
void Verify(
DataFrame
df)
495
DataFrame
df =
DataFrame
.LoadCsv(GetStream(data), dataTypes: new Type[] { typeof(string), typeof(short), typeof(int), typeof(long), typeof(float), typeof(string), typeof(double) });
497
df =
DataFrame
.LoadCsvFromString(data, dataTypes: new Type[] { typeof(string), typeof(short), typeof(int), typeof(long), typeof(float), typeof(string), typeof(double) });
511
void Verify(
DataFrame
df, bool verifyDataTypes)
567
DataFrame
df =
DataFrame
.LoadCsv(GetStream(data), dataTypes: new Type[] { typeof(string), typeof(short), typeof(int), typeof(long), typeof(float), typeof(string), typeof(double), typeof(DateTime) });
569
df =
DataFrame
.LoadCsvFromString(data, dataTypes: new Type[] { typeof(string), typeof(short), typeof(int), typeof(long), typeof(float), typeof(string), typeof(double), typeof(DateTime) });
572
df =
DataFrame
.LoadCsv(GetStream(data));
574
df =
DataFrame
.LoadCsvFromString(data);
588
void Verify(
DataFrame
df)
595
DataFrame
reducedRows =
DataFrame
.LoadCsv(GetStream(data), separator: '|', numberOfRowsToRead: 3);
611
DataFrame
df =
DataFrame
.LoadCsv(GetStream(data), separator: '|');
613
df =
DataFrame
.LoadCsvFromString(data, separator: '|');
627
void Verify(
DataFrame
df)
634
DataFrame
reducedRows =
DataFrame
.LoadCsv(GetStream(data), separator: ';', numberOfRowsToRead: 3);
650
DataFrame
df =
DataFrame
.LoadCsv(GetStream(data), separator: ';');
652
df =
DataFrame
.LoadCsvFromString(data, separator: ';');
665
void Verify(
DataFrame
df)
672
DataFrame
reducedRows =
DataFrame
.LoadCsv(GetStream(data), numberOfRowsToRead: 3);
679
DataFrame
df =
DataFrame
.LoadCsv(GetStream(data));
681
df =
DataFrame
.LoadCsvFromString(data);
694
var
df =
DataFrame
.LoadCsvFromString(data, header: true);
709
var
df =
DataFrame
.LoadCsvFromString(data, header: true, columnNames: new[] { "vendor_id", "rate_code", "passenger_count", "trip_time_in_secs", "Column0", "Column1", "Column2", "Column3" });
724
var exp = Assert.ThrowsAny<ArgumentException>(() =>
DataFrame
.LoadCsvFromString(data, header: true));
732
var
dataFrame =
DataFrame
.LoadCsvFromString("11\r\n22\r\n33", header: false, addIndexColumn: true);
751
Assert.Throws<IndexOutOfRangeException>(() =>
DataFrame
.LoadCsv(GetStream(data)));
752
Assert.Throws<IndexOutOfRangeException>(() =>
DataFrame
.LoadCsvFromString(data));
764
void Verify(
DataFrame
df)
771
DataFrame
reducedRows =
DataFrame
.LoadCsv(GetStream(data), numberOfRowsToRead: 3);
778
DataFrame
df =
DataFrame
.LoadCsv(GetStream(data));
780
df =
DataFrame
.LoadCsvFromString(data);
795
void Verify(
DataFrame
df)
821
DataFrame
df =
DataFrame
.LoadCsv(GetStream(data));
823
df =
DataFrame
.LoadCsvFromString(data);
838
void Verify(
DataFrame
df)
883
DataFrame
df =
DataFrame
.LoadCsv(GetStream(data), dataTypes: new Type[] { typeof(string), typeof(short), typeof(int), typeof(long) });
885
df =
DataFrame
.LoadCsvFromString(data, dataTypes: new Type[] { typeof(string), typeof(short), typeof(int), typeof(long) });
900
void Verify(
DataFrame
df)
945
DataFrame
df =
DataFrame
.LoadCsv(GetStream(data));
947
df =
DataFrame
.LoadCsvFromString(data);
962
DataFrame
dataFrame = new DataFrame(vBufferColumn);
966
DataFrame
.SaveCsv(dataFrame, csvStream);
969
DataFrame
readIn =
DataFrame
.LoadCsv(csvStream);
984
DataFrame
dataFrame = DataFrameTests.MakeDataFrameWithAllColumnTypes(10, true);
986
DataFrame
.SaveCsv(dataFrame, csvStream);
989
DataFrame
readIn =
DataFrame
.LoadCsv(csvStream);
1009
DataFrame
dataFrame = DataFrameTests.MakeDataFrameWithNumericColumns(10, true);
1017
DataFrame
.SaveCsv(dataFrame, csvStream, separator: separator, cultureInfo: cultureInfo);
1020
DataFrame
readIn =
DataFrame
.LoadCsv(csvStream, separator: separator);
1044
DataFrame
dataFrame = DataFrameTests.MakeDataFrameWithNumericColumns(10, true);
1050
DataFrame
.SaveCsv(dataFrame, csvStream, cultureInfo: cultureInfo);
1053
DataFrame
readIn =
DataFrame
.LoadCsv(csvStream);
1074
DataFrame
dataFrame = DataFrameTests.MakeDataFrameWithNumericColumns(10, true);
1079
Assert.Throws<ArgumentException>(() =>
DataFrame
.SaveCsv(dataFrame, csvStream, separator: separator, cultureInfo: cultureInfo));
1086
DataFrame
dataFrame = DataFrameTests.MakeDataFrameWithAllColumnTypes(10, true);
1088
DataFrame
.SaveCsv(dataFrame, csvStream, header: false);
1091
DataFrame
readIn =
DataFrame
.LoadCsv(csvStream, header: false);
1112
DataFrame
dataFrame = DataFrameTests.MakeDataFrameWithAllColumnTypes(10, true);
1115
DataFrame
.SaveCsv(dataFrame, csvStream, separator: separator);
1118
DataFrame
readIn =
DataFrame
.LoadCsv(csvStream, separator: separator);
1146
DataFrame
df =
DataFrame
.LoadCsv(GetStream(data));
1179
var
dataFrame =
DataFrame
.LoadFrom(vals, columns);
1187
var
dataFrame =
DataFrame
.LoadFrom(vals, columns);
1202
var
dataFrame =
DataFrame
.LoadFrom(vals, columns);
1214
var
resDataFrame = await
DataFrame
.LoadFrom(dataAdapter);
1226
static void AssertEqual(
DataFrame
dataFrame, (string name, Type type)[] columns, object[][] vals)
1306
public void VerifyLoadCsv(
DataFrame
df)
1514
DataFrame
df =
DataFrame
.LoadCsv(GetStream(data), dataTypes: dataTypes, separator: separator);
1522
DataFrame
df =
DataFrame
.LoadCsvFromString(data, dataTypes: dataTypes, separator: separator);
1530
DataFrame
df =
DataFrame
.LoadCsv(GetStream(data), dataTypes: dataTypes, separator: separator);
1533
DataFrame
.SaveCsv(df, csvStream, separator: separator);
1538
DataFrame
df2 =
DataFrame
.LoadCsv(csvStream, dataTypes: dataTypes, separator: separator);
1673
DataFrame
defaultDf =
DataFrame
.LoadCsvFromString(csvString);
1677
DataFrame
customDf =
DataFrame
.LoadCsvFromString(csvString, guessTypeFunction: CustomGuessTypeFunction);
1695
Assert.Throws<FormatException>(() =>
DataFrame
.LoadCsvFromString(csvString));
DataFrameGroupByTests.cs (6)
27
DataFrame
df = MakeTestDataFrameWithParityAndTensColumns(length);
50
var
df = MakeTestDataFrameWithParityAndTensColumns(0);
68
DataFrame
df = MakeTestDataFrameWithParityAndTensColumns(length);
103
DataFrame
df = MakeTestDataFrameWithParityAndTensColumns(1);
110
private
DataFrame
MakeTestDataFrameWithParityAndTensColumns(int length)
112
DataFrame
df = DataFrameTests.MakeDataFrameWithNumericColumns(length, false);
DataFrameIDataViewTests.cs (15)
105
DataFrame
df = DataFrameTests.MakeDataFrameWithAllMutableColumnTypes(10, withNulls: false);
259
DataFrame
df = DataFrameTests.MakeDataFrameWithAllMutableAndArrowColumnTypes(10, withNulls: false);
262
DataFrame
newDf = dfAsIDataView.ToDataFrame();
274
DataFrame
df = DataFrameTests.MakeDataFrameWithAllColumnTypes(10, withNulls: false);
276
DataFrame
newDf = dfAsIDataView.ToDataFrame("Int", "Double");
289
DataFrame
df = DataFrameTests.MakeDataFrameWithAllColumnTypes(dataFrameSize, withNulls: false);
293
DataFrame
newDf;
327
DataFrame
df = DataFrameTests.MakeDataFrameWithAllColumnTypes(10, withNulls: false);
329
DataFrame
newDf = dfAsIDataView.ToDataFrame(5, "Int", "Double");
369
private void VerifyDataFrameColumnAndDataViewColumnValues<T>(string columnName, IDataView data,
DataFrame
df, int maxRows = -1)
387
DataFrame
df = data.ToDataFrame();
404
DataFrame
df = data.ToDataFrame("Name", "Value");
422
DataFrame
df = data.ToDataFrame(maxRows);
439
DataFrame
df = data.ToDataFrame(3, "Name", "Value");
489
var
df = data.ToDataFrame();
DataFrameTests.BinaryOperations.cs (18)
26
DataFrame
df = MakeDataFrameWithTwoColumns(12);
30
var
ret = df.Add(5);
97
var
df1 = MakeDataFrameWithNumericColumns(length);
98
var
df2 = MakeDataFrameWithNumericColumns(length);
149
DataFrame
df = DataFrameTests.MakeDataFrameWithTwoColumns(10);
152
DataFrame
dfd = df.Add(5.0f);
157
DataFrame
dfm = df.Add(5.0m);
173
var
df = new DataFrame();
186
var
newdf = df.And(true);
188
var
newdf1 = df.And(listOfBools);
205
var
df = new DataFrame();
247
var
df = new DataFrame();
303
var
df = new DataFrame();
361
var
df = MakeDataFrameWithNumericColumns(10);
363
DataFrame
tempDf = df + 1;
416
var
plusOne = df + 1;
419
var
plusDecimal = df + 1.1m;
447
DataFrame
df = MakeDataFrameWithNumericAndBoolColumns(10, withNulls: false);
DataFrameTests.Computations.cs (5)
21
DataFrame
df = MakeDataFrameWithAllMutableColumnTypes(10);
183
DataFrame
df = MakeDataFrameWithNumericStringAndDateTimeColumns(10);
422
DataFrame
df = MakeDataFrameWithNumericColumns(length, withNulls: false, startingFrom);
484
var
dfTest = new DataFrame(col1, col2);
501
var
dfTest = new DataFrame(col1, col2);
DataFrameTests.cs (84)
22
DataFrame
dataFrame = MakeDataFrameWithTwoColumns(length: 10);
29
var
headList = dataFrame.Head(5);
32
var
tailList = dataFrame.Tail(5);
51
var
df =
DataFrame
.LoadCsvFromString("a1,a2\n1,2\n3,4");
65
DataFrame
dataFrame = new DataFrame();
108
DataFrame
dataFrame1 = new DataFrame(intColumn, floatColumn);
117
DataFrame
dataFrame = MakeDataFrameWithAllMutableColumnTypes(10);
151
DataFrame
dataFrame = new DataFrame();
167
DataFrame
dataFrame = MakeDataFrameWithAllMutableColumnTypes(10);
185
DataFrame
dataframe = new DataFrame(city, temp);
204
DataFrame
dataframe = new DataFrame(city, temp);
229
DataFrame
df = MakeDataFrameWithTwoColumns(10);
238
DataFrame
df = MakeDataFrameWithAllMutableColumnTypes(20);
244
var
sortedDf = df.OrderBy("Int");
301
DataFrame
df = MakeDataFrameWithNumericAndBoolColumns(10);
302
DataFrame
count = df.GroupBy("Bool").Count();
314
DataFrame
first = df.GroupBy("Bool").First();
326
DataFrame
head = df.GroupBy("Bool").Head(3);
347
DataFrame
tail = df.GroupBy("Bool").Tail(3);
361
DataFrame
max = df.GroupBy("Bool").Max();
375
DataFrame
min = df.GroupBy("Bool").Min();
378
DataFrame
product = df.GroupBy("Bool").Product();
381
DataFrame
sum = df.GroupBy("Bool").Sum();
384
DataFrame
mean = df.GroupBy("Bool").Mean();
404
DataFrame
columnSum = df.GroupBy("Bool").Sum("Int");
408
DataFrame
columnMax = df.GroupBy("Bool").Max("Int");
412
DataFrame
columnProduct = df.GroupBy("Bool").Product("Int");
416
DataFrame
columnMin = df.GroupBy("Bool").Min("Int");
421
DataFrame
countIntColumn = df.GroupBy("Bool").Count("Int");
427
DataFrame
firstDecimalColumn = df.GroupBy("Bool").First("Decimal");
437
void GroupCountAndAssert(
DataFrame
frame)
439
DataFrame
grouped = frame.GroupBy("Column1").Count();
443
DataFrame
df = MakeDataFrame<byte, bool>(10, false);
483
DataFrame
df = MakeDataFrameWithAllColumnTypes(10);
562
DataFrame
df = MakeDataFrameWithNumericColumns(10);
603
DataFrame
df = MakeDataFrameWithAllColumnTypes(10);
606
void VerifyDataFrameClamp(
DataFrame
clampedColumn)
642
DataFrame
clamped = df.Clamp(3, 7);
661
DataFrame
df = MakeDataFrameWithAllColumnTypes(10);
664
DataFrame
prefix = df.AddPrefix("Prefix_");
683
DataFrame
suffix = df.AddSuffix("_Suffix");
706
DataFrame
df = MakeDataFrameWithAllColumnTypes(10);
707
DataFrame
sampled = df.Sample(7);
726
DataFrame
df = MakeDataFrameWithAllMutableColumnTypes(10);
728
DataFrame
description = df.Description();
759
DataFrame
df = MakeDataFrameWithAllMutableColumnTypes(10);
769
DataFrame
Info = df.Info();
787
DataFrame
df = MakeDataFrameWithAllMutableColumnTypes(20);
790
DataFrame
anyNulls = df.DropNulls();
793
DataFrame
allNulls = df.DropNulls(DropNullOptions.All);
800
DataFrame
df = new DataFrame();
812
DataFrame
df = MakeDataFrameWithTwoColumns(20);
814
DataFrame
fillNulls = df.FillNulls(1000);
860
DataFrame
df = MakeDataFrameWithAllColumnTypes(10, withNulls: false);
861
DataFrame
valueCounts = df.Columns["Bool"].ValueCounts();
871
DataFrame
df = MakeDataFrameWithTwoColumns(10);
915
DataFrame
df = MakeDataFrameWithAllColumnTypes(dfLength, withNulls: true);
916
DataFrame
intDf = MakeDataFrameWithTwoColumns(intDfLength, false);
918
DataFrame
clone = df[intColumn];
935
DataFrame
df = MakeDataFrameWithAllColumnTypes(10);
949
DataFrame
df = MakeDataFrameWithAllColumnTypes(10);
963
DataFrame
df = MakeDataFrameWithAllColumnTypes(10);
994
DataFrame
df = MakeDataFrameWithNumericColumns(10);
1018
DataFrame
df = MakeDataFrame<float, bool>(10);
1019
DataFrame
df2 = MakeDataFrame<int, bool>(5);
1024
DataFrame
ret = df.Append(df2.Rows, inPlace: false);
1031
void Verify(
DataFrame
ret,
DataFrame
check1,
DataFrame
check2)
1053
DataFrame
dfClone = df.Clone();
1061
var
dataFrame = new DataFrame(
1067
var
dataFrame2 = new DataFrame(
1072
var
resultDataFrame = dataFrame.Append(dataFrame2.Rows);
1090
DataFrame
df = MakeDataFrame<int, bool>(10);
1096
DataFrame
ret = df.Append(new List<object> { 5, true });
1198
DataFrame
df = MakeDataFrame<int, bool>(10);
1279
DataFrame
dataFrame = MakeDataFrameWithAllColumnTypes(10);
1349
DataFrame
df = MakeDataFrameWithNumericColumns(10, true, 0);
1357
DataFrame
df = MakeDataFrameWithNumericColumns(10, true, 0);
1366
var
dfTest = new DataFrame(col);
1368
var
filteredNullDf = dfTest.Filter(dfTest["col"].ElementwiseNotEquals(null));
1383
var
dfTest = new DataFrame(index, col);
1385
var
filteredNullDf = dfTest.Filter(dfTest["col"].ElementwiseEquals(null));
DataFrameTests.Filter.cs (6)
19
DataFrame
df = MakeDataFrameWithNumericColumns(10);
31
DataFrame
df = MakeDataFrameWithAllMutableColumnTypes(10);
32
DataFrame
boolColumnFiltered = df[df.Columns["Bool"].ElementwiseEquals(true)];
45
DataFrame
intEnumerableFiltered = df[Enumerable.Range(0, 10)];
46
DataFrame
boolEnumerableFiltered = df[Enumerable.Range(0, 10).Select(x => true)];
47
DataFrame
longEnumerableFiltered = df[Enumerable.Range(0, 10).Select(x => (long)x)];
DataFrameTests.Join.cs (6)
19
DataFrame
left = MakeDataFrameWithAllMutableColumnTypes(10);
20
DataFrame
right = MakeDataFrameWithAllMutableColumnTypes(5);
24
DataFrame
join = left.Join(right);
85
private void VerifyJoin(
DataFrame
join,
DataFrame
left,
DataFrame
right, JoinAlgorithm joinAlgorithm)
DataFrameTests.Merge.cs (48)
21
DataFrame
left = MakeDataFrameWithNumericColumns(leftCount, false);
25
DataFrame
right = MakeDataFrameWithNumericColumns(rightCount, false);
29
DataFrame
merge = left.Merge<int>(right, "Int", "Int", joinAlgorithm: JoinAlgorithm.Inner);
38
DataFrame
left = MakeDataFrameWithAllMutableColumnTypes(10);
39
DataFrame
right = MakeDataFrameWithAllMutableColumnTypes(5);
43
DataFrame
merge = left.Merge<int>(right, "Int", "Int");
106
private void MatchRowsOnMergedDataFrame(
DataFrame
merge,
DataFrame
left,
DataFrame
right, long mergeRow, long? leftRow, long? rightRow)
139
DataFrame
left = MakeDataFrameWithAllMutableColumnTypes(leftLength);
144
DataFrame
right = MakeDataFrameWithAllMutableColumnTypes(rightLength);
150
DataFrame
merge = left.Merge<int>(right, "Int", "Int", joinAlgorithm: joinAlgorithm);
178
DataFrame
left = MakeDataFrameWithAllMutableColumnTypes(5);
179
DataFrame
right = MakeDataFrameWithAllMutableColumnTypes(10);
208
DataFrame
merge = left.Merge<int>(right, "Int", "Int", joinAlgorithm: JoinAlgorithm.Inner);
227
DataFrame
left = MakeDataFrameWithAllMutableColumnTypes(5);
229
DataFrame
right = MakeDataFrameWithAllMutableColumnTypes(5);
258
DataFrame
merge = left.Merge<int>(right, "Int", "Int", joinAlgorithm: JoinAlgorithm.FullOuter);
298
var
left = new DataFrame();
303
var
right = new DataFrame();
335
var
merge = left.Merge(right, new[] { "G1", "G2" }, new[] { "G1", "G2" });
364
var
left = new DataFrame();
369
var
right = new DataFrame();
396
var
merge = left.Merge(right, new[] { "G1", "G2" }, new[] { "G1", "G2" });
422
var
left = new DataFrame();
427
var
right = new DataFrame();
454
var
merge = left.Merge(right, new[] { "G1", "G2" }, new[] { "G1", "G2" }, joinAlgorithm: JoinAlgorithm.Right);
480
var
left = new DataFrame();
485
var
right = new DataFrame();
511
var
merge = left.Merge(right, new[] { "G1", "G2" }, new[] { "G1", "G2" }, joinAlgorithm: JoinAlgorithm.Inner);
536
var
left = new DataFrame();
541
var
right = new DataFrame();
569
var
merge = left.Merge(right, new[] { "G1", "G2" }, new[] { "G1", "G2" }, joinAlgorithm: JoinAlgorithm.FullOuter);
596
var
left = new DataFrame();
602
var
right = new DataFrame();
628
var
merge = left.Merge(right, new[] { "G1", "G2", "G3" }, new[] { "G1", "G2", "G3" });
652
var
left = new DataFrame();
658
var
right = new DataFrame();
684
var
merge = left.Merge(right, new[] { "G1", "G2", "G3" }, new[] { "G1", "G2", "G3" }, joinAlgorithm: JoinAlgorithm.Right);
705
DataFrame
left = MakeDataFrameWithAllMutableColumnTypes(2, false);
706
DataFrame
right = MakeDataFrameWithAllMutableColumnTypes(1);
708
DataFrame
merge = left.Merge<int>(right, "Int", "Int");
721
DataFrame
left = MakeDataFrameWithAllMutableColumnTypes(2, false);
722
DataFrame
right = MakeDataFrameWithAllMutableColumnTypes(1);
724
DataFrame
merge = left.Merge<int>(right, "Int", "Int");
766
private void VerifyMerge(
DataFrame
merge,
DataFrame
left,
DataFrame
right, JoinAlgorithm joinAlgorithm)
DataFrameTests.Sort.cs (7)
19
DataFrame
df = MakeDataFrameWithAllMutableColumnTypes(20);
23
DataFrame
dfTest;
24
DataFrame
dfTrain = SplitTrainTest(df, 0.8f, out dfTest);
27
var
sortedDf = dfTrain.OrderBy("Int");
105
DataFrame
dataFrame = MakeDataFrameWithAllMutableColumnTypes(10);
108
DataFrame
sorted = dataFrame.OrderBy("Int");
109
void Verify(
DataFrame
sortedDataFrame)
DataFrameTests.Utils.cs (21)
17
public static
DataFrame
MakeDataFrameWithTwoColumns(int length, bool withNulls = true)
26
DataFrame
dataFrame = new DataFrame();
83
public static
DataFrame
MakeDataFrameWithAllColumnTypes(int length, bool withNulls = true)
85
DataFrame
df = MakeDataFrameWithAllMutableAndArrowColumnTypes(length, withNulls);
93
public static
DataFrame
MakeDataFrameWithAllMutableAndArrowColumnTypes(int length, bool withNulls = true)
95
DataFrame
df = MakeDataFrameWithAllMutableColumnTypes(length, withNulls);
102
public static
DataFrame
MakeDataFrameWithAllMutableColumnTypes(int length, bool withNulls = true)
104
DataFrame
df = MakeDataFrameWithNumericStringAndDateTimeColumns(length, withNulls);
114
public static
DataFrame
MakeDataFrameWithNumericAndBoolColumns(int length, bool withNulls = true)
116
DataFrame
df = MakeDataFrameWithNumericColumns(length, withNulls);
126
public static
DataFrame
MakeDataFrameWithNumericAndStringColumns(int length, bool withNulls = true)
128
DataFrame
df = MakeDataFrameWithNumericColumns(length, withNulls);
146
public static
DataFrame
MakeDataFrameWithNumericStringAndDateTimeColumns(int length, bool withNulls = true)
148
DataFrame
df = MakeDataFrameWithNumericAndStringColumns(length, withNulls);
159
public static
DataFrame
MakeDataFrameWithNumericColumns(int length, bool withNulls = true, int startingFrom = 0)
190
var
dataFrame = new DataFrame(columnsList);
203
public static
DataFrame
MakeDataFrame<T1, T2>(int length, bool withNulls = true)
209
DataFrame
dataFrame = new DataFrame(new List<DataFrameColumn> { baseColumn1, baseColumn2 });
222
public
DataFrame
SplitTrainTest(
DataFrame
input, float testRatio, out
DataFrame
Test)
PrimitiveDataFrameColumnTests.cs (4)
499
var
dfTest = new DataFrame(col);
501
var
filteredNullDf = dfTest.Filter(dfTest["col"].ElementwiseNotEquals(null));
516
var
dfTest = new DataFrame(index, col);
518
var
filteredNullDf = dfTest.Filter(dfTest["col"].ElementwiseEquals(null));
Microsoft.ML.AutoML.Interactive (2)
AutoMLMonitorKernelExtension.cs (1)
101
Formatter.GetPreferredFormatterFor(typeof(
DataFrame
), "text/html").Format(notebookMonitor.TrialData, writer);
NotebookMonitor.cs (1)
25
public
DataFrame
TrialData { get; set; }
Microsoft.ML.Fairlearn (20)
Metrics\FairlearnMetricCatalog.cs (7)
76
public
DataFrame
ByGroup()
99
DataFrame
result = new DataFrame();
168
public
DataFrame
ByGroup()
185
var
evalDf = _eval.ToDataFrame();
190
var
data = new DataFrame(_eval.Schema.AsEnumerable().Select<DataViewSchema.Column, DataFrameColumn>(column =>
233
DataFrame
result = new DataFrame();
245
DataFrame
groupMetrics = ByGroup();
Metrics\GroupMetric.cs (1)
24
DataFrame
ByGroup();
Reductions\GridSearchTrialRunner.cs (2)
72
var
df = new DataFrame();
87
var
gamma = _moment.Gamma(column);
Reductions\Moment.cs (3)
25
public
DataFrame
Tags { get; private set; }
66
public abstract
DataFrame
Gamma(PrimitiveDataFrameColumn<float> yPred);
72
public abstract DataFrameColumn SignedWeights(
DataFrame
lambdaVec);
Reductions\UtilityParity.cs (7)
91
public override
DataFrame
Gamma(PrimitiveDataFrameColumn<float> yPred/* Maybe change this to a predictor (func)*/)
114
DataFrame
gSigned = new DataFrame(posSign, groupID, upperBoundDiff);
121
DataFrame
dfNeg = new DataFrame(negSign, groupID, lowerBoundDiff);
135
public override DataFrameColumn SignedWeights(
DataFrame
lambdaVec)
141
var
gPos = lambdaVec.Filter(lambdaVec["sign"].ElementwiseEquals("+")).OrderBy("group_id");
142
var
gNeg = lambdaVec.Filter(lambdaVec["sign"].ElementwiseEquals("-")).OrderBy("group_id");
147
DataFrame
lookUp = new DataFrame(gPos["group_id"], adjust);
Microsoft.ML.Fairlearn.Tests (11)
GridSearchTest.cs (6)
28
var
X = CreateDummyDataset();
36
private
DataFrame
CreateDummyDataset()
38
var
df = new DataFrame();
48
private
DataFrame
CreateGridSearchDataset()
62
var
df = new DataFrame();
92
var
df = CreateGridSearchDataset();
MetricTest.cs (3)
40
var
metricByGroup = regressionMetric.ByGroup();
69
DataFrame
df = new DataFrame(label, groupId, pred, score, prob);
72
var
metricByGroup = metrics.ByGroup();
UtilityTest.cs (2)
27
DataFrame
x = new DataFrame();
32
var
gSinged = dp.Gamma(ypred);
Microsoft.ML.TorchSharp.Tests (2)
TextClassificationTests.cs (2)
174
var
df =
DataFrame
.LoadCsv(GetDataPath("github-issues-train.tsv"), separator: '\t', header: true, columnNames: new[] { "ID", "Label", "Title", "Description" });