1 write to
Microsoft.Data.Analysis (1)
DataFrame.cs (1)
162set => Columns[columnName] = value;
432 references to
Microsoft.Data.Analysis (29)
DataFrame.cs (2)
161get => Columns[columnName]; 680DataFrameColumn column = Columns[columnName];
DataFrame.Join.cs (4)
204DataFrameColumn shrinkedRetainedColumn = retainedDataFrame.Columns[retainedJoinColumnNames[colNameIndex]]; 228DataFrameColumn supplementaryColumn = supplementaryDataFrame.Columns[supplemetaryJoinColumnNames[colNameIndex]]; 285var retainJoinColumns = retainedJoinColumnNames.Select(name => retainedDataFrame.Columns[name]).ToArray(); 390var columns = supplementaryJoinColumns.Select(name => supplementaryDataFrame.Columns[name]).ToArray();
DataFrameColumnCollection.cs (18)
43var column = this[currentName]; 217DataFrameColumn column = this[name]; 234DataFrameColumn column = this[name]; 251DataFrameColumn column = this[name]; 268DataFrameColumn column = this[name]; 285DataFrameColumn column = this[name]; 302DataFrameColumn column = this[name]; 319DataFrameColumn column = this[name]; 336DataFrameColumn column = this[name]; 353DataFrameColumn column = this[name]; 370DataFrameColumn column = this[name]; 387DataFrameColumn column = this[name]; 404DataFrameColumn column = this[name]; 421DataFrameColumn column = this[name]; 438DataFrameColumn column = this[name]; 455DataFrameColumn column = this[name]; 472DataFrameColumn column = this[name]; 489DataFrameColumn column = this[name];
GroupBy.cs (5)
173retColumn = ret.Columns[column.Name]; 214retColumn = ret.Columns[column.Name]; 259retColumn = ret.Columns[column.Name]; 315retColumn = ret.Columns[column.Name]; 349retColumn = ret.Columns[column.Name];
Microsoft.Data.Analysis.Tests (403)
ArrowIntegrationTests.cs (17)
166Assert.Equal(1, df.Columns["Column1"][1]); 167df.Columns["Column1"][1] = 100; 168Assert.Equal(100, df.Columns["Column1"][1]); 169Assert.Equal(0, df.Columns["Column1"].NullCount); 188Assert.Equal(0, df.Columns["EmptyNullBitMapColumn"].NullCount); 189Assert.Equal(10, df.Columns["EmptyNullBitMapColumn"].Length); 190df.Columns["EmptyNullBitMapColumn"][9] = null; 191Assert.Equal(1, df.Columns["EmptyNullBitMapColumn"].NullCount); 192Assert.Equal(10, df.Columns["EmptyDataColumn"].NullCount); 193Assert.Equal(10, df.Columns["EmptyDataColumn"].Length); 194df.Columns["EmptyDataColumn"][9] = 9; 195Assert.Equal(9, df.Columns["EmptyDataColumn"].NullCount); 196Assert.Equal(10, df.Columns["EmptyDataColumn"].Length); 199Assert.Equal(i, (int)df.Columns["EmptyNullBitMapColumn"][i]); 200Assert.Null(df.Columns["EmptyDataColumn"][i]); 207Assert.Equal(0, emptyDataFrame.Columns["EmptyDataAndNullColumns"].Length); 208Assert.Equal(0, emptyDataFrame.Columns["EmptyDataAndNullColumns"].NullCount);
DataFrame.IOTests.cs (19)
158Assert.Equal(verifyCMT, df.Columns["vendor_id"][3]); 170Assert.Equal(verifyCMT, reducedRows.Columns["vendor_id"][2]); 242Assert.Equal("CMT", df.Columns["vendor_id"][3]); 248Assert.Equal("CRD", df.Columns["payment_type"][0]); 249Assert.Equal("CRD_1", df.Columns["payment_type.1"][0]); 250Assert.Equal("Test", df.Columns["payment_type.2"][0]); 271Assert.Equal(verifyCMT, df.Columns["Column0"][3]); 284Assert.Equal(verifyCMT, reducedRows.Columns["Column0"][2]); 310Assert.Equal(verifyCMT, df.Columns["Column0"][3]); 323Assert.Equal(verifyCMT, reducedRows.Columns["Column0"][2]); 553var dateTimeColumn = df.Columns["date"]; 586Assert.Equal("CMT", df.Columns["vendor_id"][4]); 592Assert.Equal("CMT", reducedRows.Columns["vendor_id"][2]); 625Assert.Equal("CMT", df.Columns["vendor_id"][4]); 631Assert.Equal("CMT", reducedRows.Columns["vendor_id"][2]); 663Assert.Equal("CMT", df.Columns["vendor_id"][3]); 669Assert.Equal("CMT", reducedRows.Columns["vendor_id"][2]); 762Assert.Equal("CMT", df.Columns["vendor_id"][3]); 768Assert.Equal("CMT", reducedRows.Columns["vendor_id"][2]);
DataFrameIDataViewTests.cs (9)
273Assert.True(df.Columns["Int"].ElementwiseEquals(newDf.Columns["Int"]).All()); 274Assert.True(df.Columns["Double"].ElementwiseEquals(newDf.Columns["Double"]).All()); 332Assert.Equal(df.Columns["Int"][r], newDf.Columns["Int"][r]); 333Assert.Equal(df.Columns["Double"][r], newDf.Columns["Double"][r]); 373Assert.Equal(value, df.Columns[columnName][cc++]);
DataFrameTests.BinaryOperations.cs (30)
98newColumn = df1.Columns[df1.Columns[i].Name] + df2.Columns[df2.Columns[i].Name]; 102newColumn = df1.Columns[df1.Columns[i].Name] - df2.Columns[df2.Columns[i].Name]; 106newColumn = df1.Columns[df1.Columns[i].Name] * df2.Columns[df2.Columns[i].Name]; 120verify = df1.Columns[df1.Columns[i].Name].ElementwiseEquals(df2.Columns[df2.Columns[i].Name]); 123verify = df1.Columns[df1.Columns[i].Name].ElementwiseNotEquals(df2.Columns[df2.Columns[i].Name]); 126verify = df1.Columns[df1.Columns[i].Name].ElementwiseGreaterThanOrEqual(df2.Columns[df2.Columns[i].Name]); 129verify = df1.Columns[df1.Columns[i].Name].ElementwiseLessThanOrEqual(df2.Columns[df2.Columns[i].Name]); 132verify = df1.Columns[df1.Columns[i].Name].ElementwiseGreaterThan(df2.Columns[df2.Columns[i].Name]); 135verify = df1.Columns[df1.Columns[i].Name].ElementwiseLessThan(df2.Columns[df2.Columns[i].Name]); 363Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); 369Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); 375Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); 381Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); 387Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); 395Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); 401Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); 407Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); 416Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); 422Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); 442Int32DataFrameColumn ints = df.Columns["Int"] as Int32DataFrameColumn; 468BooleanDataFrameColumn bools = df.Columns["Bool"] as BooleanDataFrameColumn;
DataFrameTests.Computations.cs (141)
21Assert.Equal(-10, df.Columns["Int"][0]); 23DataFrameColumn absColumn = df.Columns["Int"].Abs(); 25Assert.Equal(-10, df.Columns["Int"][0]); 26df.Columns["Int"].Abs(true); 27Assert.Equal(10, df.Columns["Int"][0]); 29Assert.Throws<NotSupportedException>(() => df.Columns["Byte"].All()); 30Assert.Throws<NotSupportedException>(() => df.Columns["Byte"].Any()); 31Assert.Throws<NotSupportedException>(() => df.Columns["Char"].All()); 32Assert.Throws<NotSupportedException>(() => df.Columns["Char"].Any()); 33Assert.Throws<NotSupportedException>(() => df.Columns["DateTime"].All()); 34Assert.Throws<NotSupportedException>(() => df.Columns["DateTime"].Any()); 35Assert.Throws<NotSupportedException>(() => df.Columns["Decimal"].All()); 36Assert.Throws<NotSupportedException>(() => df.Columns["Decimal"].Any()); 37Assert.Throws<NotSupportedException>(() => df.Columns["Double"].All()); 38Assert.Throws<NotSupportedException>(() => df.Columns["Double"].Any()); 39Assert.Throws<NotSupportedException>(() => df.Columns["Float"].All()); 40Assert.Throws<NotSupportedException>(() => df.Columns["Float"].Any()); 41Assert.Throws<NotSupportedException>(() => df.Columns["Int"].All()); 42Assert.Throws<NotSupportedException>(() => df.Columns["Int"].Any()); 43Assert.Throws<NotSupportedException>(() => df.Columns["Long"].All()); 44Assert.Throws<NotSupportedException>(() => df.Columns["Long"].Any()); 45Assert.Throws<NotSupportedException>(() => df.Columns["Sbyte"].All()); 46Assert.Throws<NotSupportedException>(() => df.Columns["Sbyte"].Any()); 47Assert.Throws<NotSupportedException>(() => df.Columns["Short"].All()); 48Assert.Throws<NotSupportedException>(() => df.Columns["Short"].Any()); 49Assert.Throws<NotSupportedException>(() => df.Columns["Uint"].All()); 50Assert.Throws<NotSupportedException>(() => df.Columns["Uint"].Any()); 51Assert.Throws<NotSupportedException>(() => df.Columns["Ulong"].All()); 52Assert.Throws<NotSupportedException>(() => df.Columns["Ulong"].Any()); 53Assert.Throws<NotSupportedException>(() => df.Columns["Ushort"].All()); 54Assert.Throws<NotSupportedException>(() => df.Columns["Ushort"].Any()); 56bool any = df.Columns["Bool"].Any(); 57bool all = df.Columns["Bool"].All(); 62df.Columns["Double"][0] = 100.0; 63DataFrameColumn doubleColumn = df.Columns["Double"].CumulativeMax(); 71Assert.Equal(1.0, df.Columns["Double"][1]); 72df.Columns["Double"].CumulativeMax(true); 73for (int i = 0; i < df.Columns["Double"].Length; i++) 76Assert.Null(df.Columns["Double"][i]); 78Assert.Equal(100.0, (double)df.Columns["Double"][i]); 81df.Columns["Float"][0] = -10.0f; 82DataFrameColumn floatColumn = df.Columns["Float"].CumulativeMin(); 90Assert.Equal(9.0f, df.Columns["Float"][9]); 91df.Columns["Float"].CumulativeMin(true); 92for (int i = 0; i < df.Columns["Float"].Length; i++) 95Assert.Null(df.Columns["Float"][i]); 97Assert.Equal(-10.0f, (float)df.Columns["Float"][i]); 100DataFrameColumn uintColumn = df.Columns["Uint"].CumulativeProduct(); 102Assert.Equal((uint)8, df.Columns["Uint"][8]); 103df.Columns["Uint"].CumulativeProduct(true); 104Assert.Equal((uint)0, df.Columns["Uint"][9]); 106DataFrameColumn ushortColumn = df.Columns["Ushort"].CumulativeSum(); 108Assert.Equal((ushort)9, df.Columns["Ushort"][9]); 109df.Columns["Ushort"].CumulativeSum(true); 110Assert.Equal((ushort)40, df.Columns["Ushort"][9]); 112Assert.Equal(100.0, df.Columns["Double"].Max()); 113Assert.Equal(-10.0f, df.Columns["Float"].Min()); 114Assert.Equal((uint)0, df.Columns["Uint"].Product()); 115Assert.Equal((ushort)130, df.Columns["Ushort"].Sum()); 117df.Columns["Double"][0] = 100.1; 118Assert.Equal(100.1, df.Columns["Double"][0]); 119DataFrameColumn roundColumn = df.Columns["Double"].Round(); 121Assert.Equal(100.1, df.Columns["Double"][0]); 122df.Columns["Double"].Round(true); 123Assert.Equal(100.0, df.Columns["Double"][0]); 183Assert.Equal(-10, df.Columns["Int"][0]); 185DataFrameColumn absColumn = df.Columns["Int"].Abs(); 187Assert.Equal(-10, df.Columns["Int"][0]); 188df.Columns["Int"].Abs(true); 189Assert.Equal(10, df.Columns["Int"][0]); 191Assert.Throws<NotSupportedException>(() => df.Columns["Byte"].All()); 192Assert.Throws<NotSupportedException>(() => df.Columns["Byte"].Any()); 193Assert.Throws<NotSupportedException>(() => df.Columns["Char"].All()); 194Assert.Throws<NotSupportedException>(() => df.Columns["Char"].Any()); 195Assert.Throws<NotSupportedException>(() => df.Columns["Decimal"].All()); 196Assert.Throws<NotSupportedException>(() => df.Columns["Decimal"].Any()); 197Assert.Throws<NotSupportedException>(() => df.Columns["Double"].All()); 198Assert.Throws<NotSupportedException>(() => df.Columns["Double"].Any()); 199Assert.Throws<NotSupportedException>(() => df.Columns["Float"].All()); 200Assert.Throws<NotSupportedException>(() => df.Columns["Float"].Any()); 201Assert.Throws<NotSupportedException>(() => df.Columns["Int"].All()); 202Assert.Throws<NotSupportedException>(() => df.Columns["Int"].Any()); 203Assert.Throws<NotSupportedException>(() => df.Columns["Long"].All()); 204Assert.Throws<NotSupportedException>(() => df.Columns["Long"].Any()); 205Assert.Throws<NotSupportedException>(() => df.Columns["Sbyte"].All()); 206Assert.Throws<NotSupportedException>(() => df.Columns["Sbyte"].Any()); 207Assert.Throws<NotSupportedException>(() => df.Columns["Short"].All()); 208Assert.Throws<NotSupportedException>(() => df.Columns["Short"].Any()); 209Assert.Throws<NotSupportedException>(() => df.Columns["Uint"].All()); 210Assert.Throws<NotSupportedException>(() => df.Columns["Uint"].Any()); 211Assert.Throws<NotSupportedException>(() => df.Columns["Ulong"].All()); 212Assert.Throws<NotSupportedException>(() => df.Columns["Ulong"].Any()); 213Assert.Throws<NotSupportedException>(() => df.Columns["Ushort"].All()); 214Assert.Throws<NotSupportedException>(() => df.Columns["Ushort"].Any()); 215Assert.Throws<NotSupportedException>(() => df.Columns["DateTime"].All()); 216Assert.Throws<NotSupportedException>(() => df.Columns["DateTime"].Any()); 220df.Columns["DateTime"][0] = maxDate; 221DataFrameColumn dateTimeColumn = df.Columns["DateTime"].CumulativeMax(); 231df.Columns["Double"][0] = 100.0; 232DataFrameColumn doubleColumn = df.Columns["Double"].CumulativeMax(); 240Assert.Equal(1.0, df.Columns["Double"][1]); 241df.Columns["Double"].CumulativeMax(true); 242for (int i = 0; i < df.Columns["Double"].Length; i++) 245Assert.Null(df.Columns["Double"][i]); 247Assert.Equal(100.0, (double)df.Columns["Double"][i]); 250df.Columns["Float"][0] = -10.0f; 251DataFrameColumn floatColumn = df.Columns["Float"].CumulativeMin(); 259Assert.Equal(9.0f, df.Columns["Float"][9]); 260df.Columns["Float"].CumulativeMin(true); 261for (int i = 0; i < df.Columns["Float"].Length; i++) 264Assert.Null(df.Columns["Float"][i]); 266Assert.Equal(-10.0f, (float)df.Columns["Float"][i]); 269DataFrameColumn uintColumn = df.Columns["Uint"].CumulativeProduct(); 271Assert.Equal((uint)8, df.Columns["Uint"][8]); 272df.Columns["Uint"].CumulativeProduct(true); 273Assert.Equal((uint)0, df.Columns["Uint"][9]); 275DataFrameColumn ushortColumn = df.Columns["Ushort"].CumulativeSum(); 277Assert.Equal((ushort)9, df.Columns["Ushort"][9]); 278df.Columns["Ushort"].CumulativeSum(true); 279Assert.Equal((ushort)40, df.Columns["Ushort"][9]); 281Assert.Equal(100.0, df.Columns["Double"].Max()); 282Assert.Equal(-10.0f, df.Columns["Float"].Min()); 283Assert.Equal((uint)0, df.Columns["Uint"].Product()); 284Assert.Equal((ushort)130, df.Columns["Ushort"].Sum()); 286df.Columns["Double"][0] = 100.1; 287Assert.Equal(100.1, df.Columns["Double"][0]); 288DataFrameColumn roundColumn = df.Columns["Double"].Round(); 290Assert.Equal(100.1, df.Columns["Double"][0]); 291df.Columns["Double"].Round(true); 292Assert.Equal(100.0, df.Columns["Double"][0]); 422var byteColumn = (PrimitiveDataFrameColumn<byte>)df.Columns["Byte"]; 423var decimalColumn = (PrimitiveDataFrameColumn<decimal>)df.Columns["Decimal"]; 424var doubleColumn = (PrimitiveDataFrameColumn<double>)df.Columns["Double"]; 425var floatColumn = (PrimitiveDataFrameColumn<float>)df.Columns["Float"]; 426var intColumn = (PrimitiveDataFrameColumn<int>)df.Columns["Int"]; 427var longColumn = (PrimitiveDataFrameColumn<long>)df.Columns["Long"]; 428var sbyteColumn = (PrimitiveDataFrameColumn<sbyte>)df.Columns["Sbyte"]; 429var shortColumn = (PrimitiveDataFrameColumn<short>)df.Columns["Short"]; 430var uintColumn = (PrimitiveDataFrameColumn<uint>)df.Columns["Uint"]; 431var ulongColumn = (PrimitiveDataFrameColumn<ulong>)df.Columns["Ulong"]; 432var ushortColumn = (PrimitiveDataFrameColumn<ushort>)df.Columns["Ushort"];
DataFrameTests.cs (120)
53var dc = df.Columns["a1"]; 130DataFrameColumn intColumn_1 = dataFrame.Columns["NewIntColumn"]; 134DataFrameColumn lastColumn_1 = dataFrame.Columns[originalLastColumn.Name]; 229df["Int3"] = df.Columns["Int1"] * 2 + df.Columns["Int2"]; 230Assert.Equal(16, df.Columns["Int3"][2]); 237df.Columns["Int"][0] = 100; 238df.Columns["Int"][19] = -1; 239df.Columns["Int"][5] = 2000; 243Assert.Null(sortedDf.Columns["Int"][19]); 244Assert.Equal(-1, sortedDf.Columns["Int"][0]); 245Assert.Equal(100, sortedDf.Columns["Int"][17]); 246Assert.Equal(2000, sortedDf.Columns["Int"][18]); 250Assert.Null(sortedDf.Columns["Int"][19]); 251Assert.Equal(-1, sortedDf.Columns["Int"][18]); 252Assert.Equal(100, sortedDf.Columns["Int"][1]); 253Assert.Equal(2000, sortedDf.Columns["Int"][0]); 257Assert.Null(sortedDf.Columns["Int"][0]); 258Assert.Equal(-1, sortedDf.Columns["Int"][1]); 259Assert.Equal(100, sortedDf.Columns["Int"][18]); 260Assert.Equal(2000, sortedDf.Columns["Int"][19]); 264Assert.Null(sortedDf.Columns["Int"][0]); 265Assert.Equal(-1, sortedDf.Columns["Int"][19]); 266Assert.Equal(100, sortedDf.Columns["Int"][2]); 267Assert.Equal(2000, sortedDf.Columns["Int"][1]); 271Assert.Null(sortedDf.Columns["Int"][19]); 272Assert.Equal(1, sortedDf.Columns["Int"][1]); 273Assert.Equal(8, sortedDf.Columns["Int"][17]); 274Assert.Equal(9, sortedDf.Columns["Int"][18]); 278Assert.Null(sortedDf.Columns["Int"][19]); 279Assert.Equal(8, sortedDf.Columns["Int"][1]); 280Assert.Equal(9, sortedDf.Columns["Int"][0]); 284Assert.Null(sortedDf.Columns["Int"][0]); 285Assert.Equal(1, sortedDf.Columns["Int"][2]); 286Assert.Equal(8, sortedDf.Columns["Int"][18]); 287Assert.Equal(9, sortedDf.Columns["Int"][19]); 291Assert.Null(sortedDf.Columns["Int"][0]); 292Assert.Equal(8, sortedDf.Columns["Int"][2]); 293Assert.Equal(9, sortedDf.Columns["Int"][1]); 302Assert.Equal((long)5, count.Columns["Int"][0]); 303Assert.Equal((long)4, count.Columns["Decimal"][1]); 319DataFrameColumn firstColumn = first.Columns[originalColumn.Name]; 331DataFrameColumn headColumn = head.Columns[originalColumn.Name]; 340DataFrameColumn headColumn = head.Columns[originalColumn.Name]; 354DataFrameColumn tailColumn = tail.Columns[originalColumn.Name]; 368DataFrameColumn maxColumn = max.Columns[originalColumn.Name]; 391DataFrameColumn minColumn = min.Columns[originalColumn.Name]; 394DataFrameColumn productColumn = product.Columns[originalColumn.Name]; 397DataFrameColumn sumColumn = sum.Columns[originalColumn.Name]; 404Assert.Equal(20, columnSum.Columns["Int"][0]); 405Assert.Equal(20, columnSum.Columns["Int"][1]); 408Assert.Equal(8, columnMax.Columns["Int"][0]); 409Assert.Equal(9, columnMax.Columns["Int"][1]); 412Assert.Equal(0, columnProduct.Columns["Int"][0]); 413Assert.Equal(0, columnProduct.Columns["Int"][1]); 416Assert.Equal(0, columnMin.Columns["Int"][0]); 417Assert.Equal(1, columnMin.Columns["Int"][1]); 422Assert.Equal((long)5, countIntColumn.Columns["Int"][0]); 423Assert.Equal((long)4, countIntColumn.Columns["Int"][1]); 428Assert.Equal((decimal)0, firstDecimalColumn.Columns["Decimal"][0]); 429Assert.Equal((decimal)1, firstDecimalColumn.Columns["Decimal"][1]); 496StringDataFrameColumn stringColumn = (StringDataFrameColumn)df.Columns["String"]; 511ArrowStringDataFrameColumn arrowStringColumn = (ArrowStringDataFrameColumn)df.Columns["ArrowString"]; 526SingleDataFrameColumn floatColumn = (SingleDataFrameColumn)df.Columns["Float"]; 541Int32DataFrameColumn intColumn = (Int32DataFrameColumn)df.Columns["Int"]; 562DataFrameColumn clamped = df.Columns["Int"].Clamp(3, 7); 564Assert.Equal(0, df.Columns["Int"][0]); 566Assert.Equal(1, df.Columns["Int"][1]); 568Assert.Equal(2, df.Columns["Int"][2]); 570Assert.Equal(3, df.Columns["Int"][3]); 572Assert.Equal(4, df.Columns["Int"][4]); 574Assert.Null(df.Columns["Int"][5]); 576Assert.Equal(6, df.Columns["Int"][6]); 578Assert.Equal(7, df.Columns["Int"][7]); 580Assert.Equal(8, df.Columns["Int"][8]); 582Assert.Equal(9, df.Columns["Int"][9]); 585df.Columns["Int"].Clamp(3, 7, true); 586Assert.Equal(3, df.Columns["Int"][0]); 587Assert.Equal(3, df.Columns["Int"][1]); 588Assert.Equal(3, df.Columns["Int"][2]); 589Assert.Equal(3, df.Columns["Int"][3]); 590Assert.Equal(4, df.Columns["Int"][4]); 591Assert.Null(df.Columns["Int"][5]); 592Assert.Equal(6, df.Columns["Int"][6]); 593Assert.Equal(7, df.Columns["Int"][7]); 594Assert.Equal(7, df.Columns["Int"][8]); 595Assert.Equal(7, df.Columns["Int"][9]); 645Assert.Equal(i, df.Columns["Int"][i]); 647Assert.Null(df.Columns["Int"][5]); 711foreach (int? value in sampled.Columns["Int"]) 859DataFrame valueCounts = df.Columns["Bool"].ValueCounts(); 861Assert.Equal((long)5, valueCounts.Columns["Counts"][0]); 862Assert.Equal((long)5, valueCounts.Columns["Counts"][1]); 870Int32DataFrameColumn column = df.Columns["Int1"] as Int32DataFrameColumn; 915Int32DataFrameColumn intColumn = intDf.Columns["Int1"] as Int32DataFrameColumn; 934BooleanDataFrameColumn bigInts = new BooleanDataFrameColumn("BigInts", df.Columns["Int"].ElementwiseGreaterThan(5)); 1130Assert.Equal(15, df.Columns["Column1"].Length); 1131Assert.Equal(15, df.Columns["Column2"].Length); 1137Assert.Equal(16, ret.Columns["Column1"].Length); 1138Assert.Equal(16, ret.Columns["Column2"].Length); 1144Assert.Equal(16, df.Columns["Column1"].Length); 1145Assert.Equal(16, df.Columns["Column2"].Length); 1150Assert.Equal(17, ret.Columns["Column1"].Length); 1151Assert.Equal(17, ret.Columns["Column2"].Length); 1157Assert.Equal(17, df.Columns["Column1"].Length); 1158Assert.Equal(17, df.Columns["Column2"].Length); 1163Assert.Equal(18, ret.Columns["Column1"].Length); 1164Assert.Equal(18, ret.Columns["Column2"].Length); 1175Assert.Equal(18, df.Columns["Column1"].Length); 1176Assert.Equal(18, df.Columns["Column2"].Length); 1182Assert.Equal(18, df.Columns["Column1"].Length); 1183Assert.Equal(18, df.Columns["Column2"].Length); 1187Assert.Equal(19, ret.Columns["Column1"].Length); 1188Assert.Equal(19, ret.Columns["Column2"].Length); 1369Assert.Equal(3, filteredNullDf.Columns["col"].Length); 1371Assert.Equal("One", filteredNullDf.Columns["col"][0]); 1372Assert.Equal("Two", filteredNullDf.Columns["col"][1]); 1373Assert.Equal("Three", filteredNullDf.Columns["col"][2]); 1390Assert.Equal(2, filteredNullDf.Columns["index"][0]); 1391Assert.Equal(5, filteredNullDf.Columns["index"][1]);
DataFrameTests.Filter.cs (2)
20DataFrameColumn filtered = df.Columns["Int"].Filter(3, 7); 32DataFrame boolColumnFiltered = df[df.Columns["Bool"].ElementwiseEquals(true)];
DataFrameTests.Join.cs (16)
27Assert.Null(join.Columns["Int_right"][6]); 34Assert.Equal(join.Columns["Int_right"][3], right.Columns["Int"][3]); 35Assert.Null(join.Columns["Int_right"][2]); 42Assert.Null(join.Columns["Int_right"][6]); 49Assert.Equal(join.Columns["Int_right"][3], right.Columns["Int"][3]); 50Assert.Null(join.Columns["Int_right"][2]); 59Assert.Equal(join.Columns["Int_right"][6], right.Columns["Int"][6]); 66Assert.Equal(join.Columns["Int_right"][2], right.Columns["Int"][2]); 67Assert.Null(join.Columns["Int_left"][12]); 74Assert.Null(join.Columns["Int_left"][12]); 81Assert.Equal(join.Columns["Int_right"][2], right.Columns["Int"][2]);
DataFrameTests.Merge.cs (36)
31Assert.Equal("Left", (string)merge.Columns["String_left"][0]); 32Assert.Equal("Right", (string)merge.Columns["String_right"][0]); 46Assert.Null(merge.Columns["Int_right"][6]); 47Assert.Null(merge.Columns["Int_left"][5]); 54Assert.Equal(merge.Columns["Int_right"][3], right.Columns["Int"][3]); 55Assert.Null(merge.Columns["Int_right"][2]); 62Assert.Null(merge.Columns["Int_right"][6]); 69Assert.Equal(merge.Columns["Int_right"][2], right.Columns["Int"][3]); 70Assert.Null(merge.Columns["Int_right"][4]); 79Assert.Equal(merge.Columns["Int_right"][6], right.Columns["Int"][6]); 86Assert.Equal(merge.Columns["Int_right"][2], right.Columns["Int"][2]); 87Assert.Null(merge.Columns["Int_left"][12]); 94Assert.Null(merge.Columns["Int_left"][12]); 95Assert.Null(merge.Columns["Int_left"][15]); 102Assert.Equal(merge.Columns["Int_right"][2], right.Columns["Int"][2]); 711Assert.Equal(0, (int)merge.Columns["Int_left"][0]); 712Assert.Equal(1, (int)merge.Columns["Int_left"][1]); 771for (int i = 0; i < merge.Columns["Int_left"].Length; i++) 773if (merge.Columns["Int_left"][i] == null) 775intersection.Add((int)merge.Columns["Int_left"][i]); 777for (int i = 0; i < left.Columns["Int"].Length; i++) 779if (left.Columns["Int"][i] != null && intersection.Contains((int)left.Columns["Int"][i])) 780intersection.Remove((int)left.Columns["Int"][i]); 787for (int i = 0; i < merge.Columns["Int_right"].Length; i++) 789if (merge.Columns["Int_right"][i] == null) 791intersection.Add((int)merge.Columns["Int_right"][i]); 793for (int i = 0; i < right.Columns["Int"].Length; i++) 795if (right.Columns["Int"][i] != null && intersection.Contains((int)right.Columns["Int"][i])) 796intersection.Remove((int)right.Columns["Int"][i]);
DataFrameTests.Sort.cs (7)
20df.Columns["Int"][0] = 100000; 21df.Columns["Int"][df.Rows.Count - 1] = -1; 22df.Columns["Int"][5] = 200000; 28Assert.Null(sortedDf.Columns["Int"][sortedDf.Rows.Count - 1]); 29Assert.Equal(1, sortedDf.Columns["Int"][0]); 30Assert.Equal(100000, sortedDf.Columns["Int"][sortedDf.Rows.Count - 3]); 31Assert.Equal(200000, sortedDf.Columns["Int"][sortedDf.Rows.Count - 2]);
PrimitiveDataFrameColumnTests.cs (6)
498Assert.Equal(3, filteredNullDf.Columns["col"].Length); 500Assert.Equal(1.23, filteredNullDf.Columns["col"][0]); 501Assert.Equal(2.0, filteredNullDf.Columns["col"][1]); 502Assert.Equal(3.0, filteredNullDf.Columns["col"][2]); 519Assert.Equal(2, filteredNullDf.Columns["index"][0]); 520Assert.Equal(5, filteredNullDf.Columns["index"][1]);