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)
177Assert.Equal(1, df.Columns["Column1"][1]); 178df.Columns["Column1"][1] = 100; 179Assert.Equal(100, df.Columns["Column1"][1]); 180Assert.Equal(0, df.Columns["Column1"].NullCount); 199Assert.Equal(0, df.Columns["EmptyNullBitMapColumn"].NullCount); 200Assert.Equal(10, df.Columns["EmptyNullBitMapColumn"].Length); 201df.Columns["EmptyNullBitMapColumn"][9] = null; 202Assert.Equal(1, df.Columns["EmptyNullBitMapColumn"].NullCount); 203Assert.Equal(10, df.Columns["EmptyDataColumn"].NullCount); 204Assert.Equal(10, df.Columns["EmptyDataColumn"].Length); 205df.Columns["EmptyDataColumn"][9] = 9; 206Assert.Equal(9, df.Columns["EmptyDataColumn"].NullCount); 207Assert.Equal(10, df.Columns["EmptyDataColumn"].Length); 210Assert.Equal(i, (int)df.Columns["EmptyNullBitMapColumn"][i]); 211Assert.Null(df.Columns["EmptyDataColumn"][i]); 218Assert.Equal(0, emptyDataFrame.Columns["EmptyDataAndNullColumns"].Length); 219Assert.Equal(0, emptyDataFrame.Columns["EmptyDataAndNullColumns"].NullCount);
DataFrame.IOTests.cs (19)
164Assert.Equal(verifyCMT, df.Columns["vendor_id"][3]); 176Assert.Equal(verifyCMT, reducedRows.Columns["vendor_id"][2]); 248Assert.Equal("CMT", df.Columns["vendor_id"][3]); 254Assert.Equal("CRD", df.Columns["payment_type"][0]); 255Assert.Equal("CRD_1", df.Columns["payment_type.1"][0]); 256Assert.Equal("Test", df.Columns["payment_type.2"][0]); 277Assert.Equal(verifyCMT, df.Columns["Column0"][3]); 290Assert.Equal(verifyCMT, reducedRows.Columns["Column0"][2]); 316Assert.Equal(verifyCMT, df.Columns["Column0"][3]); 329Assert.Equal(verifyCMT, reducedRows.Columns["Column0"][2]); 559var dateTimeColumn = df.Columns["date"]; 592Assert.Equal("CMT", df.Columns["vendor_id"][4]); 598Assert.Equal("CMT", reducedRows.Columns["vendor_id"][2]); 631Assert.Equal("CMT", df.Columns["vendor_id"][4]); 637Assert.Equal("CMT", reducedRows.Columns["vendor_id"][2]); 669Assert.Equal("CMT", df.Columns["vendor_id"][3]); 675Assert.Equal("CMT", reducedRows.Columns["vendor_id"][2]); 768Assert.Equal("CMT", df.Columns["vendor_id"][3]); 774Assert.Equal("CMT", reducedRows.Columns["vendor_id"][2]);
DataFrameIDataViewTests.cs (9)
279Assert.True(df.Columns["Int"].ElementwiseEquals(newDf.Columns["Int"]).All()); 280Assert.True(df.Columns["Double"].ElementwiseEquals(newDf.Columns["Double"]).All()); 338Assert.Equal(df.Columns["Int"][r], newDf.Columns["Int"][r]); 339Assert.Equal(df.Columns["Double"][r], newDf.Columns["Double"][r]); 379Assert.Equal(value, df.Columns[columnName][cc++]);
DataFrameTests.BinaryOperations.cs (30)
104newColumn = df1.Columns[df1.Columns[i].Name] + df2.Columns[df2.Columns[i].Name]; 108newColumn = df1.Columns[df1.Columns[i].Name] - df2.Columns[df2.Columns[i].Name]; 112newColumn = df1.Columns[df1.Columns[i].Name] * df2.Columns[df2.Columns[i].Name]; 126verify = df1.Columns[df1.Columns[i].Name].ElementwiseEquals(df2.Columns[df2.Columns[i].Name]); 129verify = df1.Columns[df1.Columns[i].Name].ElementwiseNotEquals(df2.Columns[df2.Columns[i].Name]); 132verify = df1.Columns[df1.Columns[i].Name].ElementwiseGreaterThanOrEqual(df2.Columns[df2.Columns[i].Name]); 135verify = df1.Columns[df1.Columns[i].Name].ElementwiseLessThanOrEqual(df2.Columns[df2.Columns[i].Name]); 138verify = df1.Columns[df1.Columns[i].Name].ElementwiseGreaterThan(df2.Columns[df2.Columns[i].Name]); 141verify = df1.Columns[df1.Columns[i].Name].ElementwiseLessThan(df2.Columns[df2.Columns[i].Name]); 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); 393Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); 401Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); 407Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); 413Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); 422Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); 428Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); 448Int32DataFrameColumn ints = df.Columns["Int"] as Int32DataFrameColumn; 474BooleanDataFrameColumn bools = df.Columns["Bool"] as BooleanDataFrameColumn;
DataFrameTests.Computations.cs (141)
23Assert.Equal(-10, df.Columns["Int"][0]); 25DataFrameColumn absColumn = df.Columns["Int"].Abs(); 27Assert.Equal(-10, df.Columns["Int"][0]); 28df.Columns["Int"].Abs(true); 29Assert.Equal(10, df.Columns["Int"][0]); 31Assert.Throws<NotSupportedException>(() => df.Columns["Byte"].All()); 32Assert.Throws<NotSupportedException>(() => df.Columns["Byte"].Any()); 33Assert.Throws<NotSupportedException>(() => df.Columns["Char"].All()); 34Assert.Throws<NotSupportedException>(() => df.Columns["Char"].Any()); 35Assert.Throws<NotSupportedException>(() => df.Columns["DateTime"].All()); 36Assert.Throws<NotSupportedException>(() => df.Columns["DateTime"].Any()); 37Assert.Throws<NotSupportedException>(() => df.Columns["Decimal"].All()); 38Assert.Throws<NotSupportedException>(() => df.Columns["Decimal"].Any()); 39Assert.Throws<NotSupportedException>(() => df.Columns["Double"].All()); 40Assert.Throws<NotSupportedException>(() => df.Columns["Double"].Any()); 41Assert.Throws<NotSupportedException>(() => df.Columns["Float"].All()); 42Assert.Throws<NotSupportedException>(() => df.Columns["Float"].Any()); 43Assert.Throws<NotSupportedException>(() => df.Columns["Int"].All()); 44Assert.Throws<NotSupportedException>(() => df.Columns["Int"].Any()); 45Assert.Throws<NotSupportedException>(() => df.Columns["Long"].All()); 46Assert.Throws<NotSupportedException>(() => df.Columns["Long"].Any()); 47Assert.Throws<NotSupportedException>(() => df.Columns["Sbyte"].All()); 48Assert.Throws<NotSupportedException>(() => df.Columns["Sbyte"].Any()); 49Assert.Throws<NotSupportedException>(() => df.Columns["Short"].All()); 50Assert.Throws<NotSupportedException>(() => df.Columns["Short"].Any()); 51Assert.Throws<NotSupportedException>(() => df.Columns["Uint"].All()); 52Assert.Throws<NotSupportedException>(() => df.Columns["Uint"].Any()); 53Assert.Throws<NotSupportedException>(() => df.Columns["Ulong"].All()); 54Assert.Throws<NotSupportedException>(() => df.Columns["Ulong"].Any()); 55Assert.Throws<NotSupportedException>(() => df.Columns["Ushort"].All()); 56Assert.Throws<NotSupportedException>(() => df.Columns["Ushort"].Any()); 58bool any = df.Columns["Bool"].Any(); 59bool all = df.Columns["Bool"].All(); 64df.Columns["Double"][0] = 100.0; 65DataFrameColumn doubleColumn = df.Columns["Double"].CumulativeMax(); 73Assert.Equal(1.0, df.Columns["Double"][1]); 74df.Columns["Double"].CumulativeMax(true); 75for (int i = 0; i < df.Columns["Double"].Length; i++) 78Assert.Null(df.Columns["Double"][i]); 80Assert.Equal(100.0, (double)df.Columns["Double"][i]); 83df.Columns["Float"][0] = -10.0f; 84DataFrameColumn floatColumn = df.Columns["Float"].CumulativeMin(); 92Assert.Equal(9.0f, df.Columns["Float"][9]); 93df.Columns["Float"].CumulativeMin(true); 94for (int i = 0; i < df.Columns["Float"].Length; i++) 97Assert.Null(df.Columns["Float"][i]); 99Assert.Equal(-10.0f, (float)df.Columns["Float"][i]); 102DataFrameColumn uintColumn = df.Columns["Uint"].CumulativeProduct(); 104Assert.Equal((uint)8, df.Columns["Uint"][8]); 105df.Columns["Uint"].CumulativeProduct(true); 106Assert.Equal((uint)0, df.Columns["Uint"][9]); 108DataFrameColumn ushortColumn = df.Columns["Ushort"].CumulativeSum(); 110Assert.Equal((ushort)9, df.Columns["Ushort"][9]); 111df.Columns["Ushort"].CumulativeSum(true); 112Assert.Equal((ushort)40, df.Columns["Ushort"][9]); 114Assert.Equal(100.0, df.Columns["Double"].Max()); 115Assert.Equal(-10.0f, df.Columns["Float"].Min()); 116Assert.Equal((uint)0, df.Columns["Uint"].Product()); 117Assert.Equal((ushort)130, df.Columns["Ushort"].Sum()); 119df.Columns["Double"][0] = 100.1; 120Assert.Equal(100.1, df.Columns["Double"][0]); 121DataFrameColumn roundColumn = df.Columns["Double"].Round(); 123Assert.Equal(100.1, df.Columns["Double"][0]); 124df.Columns["Double"].Round(true); 125Assert.Equal(100.0, df.Columns["Double"][0]); 185Assert.Equal(-10, df.Columns["Int"][0]); 187DataFrameColumn absColumn = df.Columns["Int"].Abs(); 189Assert.Equal(-10, df.Columns["Int"][0]); 190df.Columns["Int"].Abs(true); 191Assert.Equal(10, df.Columns["Int"][0]); 193Assert.Throws<NotSupportedException>(() => df.Columns["Byte"].All()); 194Assert.Throws<NotSupportedException>(() => df.Columns["Byte"].Any()); 195Assert.Throws<NotSupportedException>(() => df.Columns["Char"].All()); 196Assert.Throws<NotSupportedException>(() => df.Columns["Char"].Any()); 197Assert.Throws<NotSupportedException>(() => df.Columns["Decimal"].All()); 198Assert.Throws<NotSupportedException>(() => df.Columns["Decimal"].Any()); 199Assert.Throws<NotSupportedException>(() => df.Columns["Double"].All()); 200Assert.Throws<NotSupportedException>(() => df.Columns["Double"].Any()); 201Assert.Throws<NotSupportedException>(() => df.Columns["Float"].All()); 202Assert.Throws<NotSupportedException>(() => df.Columns["Float"].Any()); 203Assert.Throws<NotSupportedException>(() => df.Columns["Int"].All()); 204Assert.Throws<NotSupportedException>(() => df.Columns["Int"].Any()); 205Assert.Throws<NotSupportedException>(() => df.Columns["Long"].All()); 206Assert.Throws<NotSupportedException>(() => df.Columns["Long"].Any()); 207Assert.Throws<NotSupportedException>(() => df.Columns["Sbyte"].All()); 208Assert.Throws<NotSupportedException>(() => df.Columns["Sbyte"].Any()); 209Assert.Throws<NotSupportedException>(() => df.Columns["Short"].All()); 210Assert.Throws<NotSupportedException>(() => df.Columns["Short"].Any()); 211Assert.Throws<NotSupportedException>(() => df.Columns["Uint"].All()); 212Assert.Throws<NotSupportedException>(() => df.Columns["Uint"].Any()); 213Assert.Throws<NotSupportedException>(() => df.Columns["Ulong"].All()); 214Assert.Throws<NotSupportedException>(() => df.Columns["Ulong"].Any()); 215Assert.Throws<NotSupportedException>(() => df.Columns["Ushort"].All()); 216Assert.Throws<NotSupportedException>(() => df.Columns["Ushort"].Any()); 217Assert.Throws<NotSupportedException>(() => df.Columns["DateTime"].All()); 218Assert.Throws<NotSupportedException>(() => df.Columns["DateTime"].Any()); 222df.Columns["DateTime"][0] = maxDate; 223DataFrameColumn dateTimeColumn = df.Columns["DateTime"].CumulativeMax(); 233df.Columns["Double"][0] = 100.0; 234DataFrameColumn doubleColumn = df.Columns["Double"].CumulativeMax(); 242Assert.Equal(1.0, df.Columns["Double"][1]); 243df.Columns["Double"].CumulativeMax(true); 244for (int i = 0; i < df.Columns["Double"].Length; i++) 247Assert.Null(df.Columns["Double"][i]); 249Assert.Equal(100.0, (double)df.Columns["Double"][i]); 252df.Columns["Float"][0] = -10.0f; 253DataFrameColumn floatColumn = df.Columns["Float"].CumulativeMin(); 261Assert.Equal(9.0f, df.Columns["Float"][9]); 262df.Columns["Float"].CumulativeMin(true); 263for (int i = 0; i < df.Columns["Float"].Length; i++) 266Assert.Null(df.Columns["Float"][i]); 268Assert.Equal(-10.0f, (float)df.Columns["Float"][i]); 271DataFrameColumn uintColumn = df.Columns["Uint"].CumulativeProduct(); 273Assert.Equal((uint)8, df.Columns["Uint"][8]); 274df.Columns["Uint"].CumulativeProduct(true); 275Assert.Equal((uint)0, df.Columns["Uint"][9]); 277DataFrameColumn ushortColumn = df.Columns["Ushort"].CumulativeSum(); 279Assert.Equal((ushort)9, df.Columns["Ushort"][9]); 280df.Columns["Ushort"].CumulativeSum(true); 281Assert.Equal((ushort)40, df.Columns["Ushort"][9]); 283Assert.Equal(100.0, df.Columns["Double"].Max()); 284Assert.Equal(-10.0f, df.Columns["Float"].Min()); 285Assert.Equal((uint)0, df.Columns["Uint"].Product()); 286Assert.Equal((ushort)130, df.Columns["Ushort"].Sum()); 288df.Columns["Double"][0] = 100.1; 289Assert.Equal(100.1, df.Columns["Double"][0]); 290DataFrameColumn roundColumn = df.Columns["Double"].Round(); 292Assert.Equal(100.1, df.Columns["Double"][0]); 293df.Columns["Double"].Round(true); 294Assert.Equal(100.0, df.Columns["Double"][0]); 424var byteColumn = (PrimitiveDataFrameColumn<byte>)df.Columns["Byte"]; 425var decimalColumn = (PrimitiveDataFrameColumn<decimal>)df.Columns["Decimal"]; 426var doubleColumn = (PrimitiveDataFrameColumn<double>)df.Columns["Double"]; 427var floatColumn = (PrimitiveDataFrameColumn<float>)df.Columns["Float"]; 428var intColumn = (PrimitiveDataFrameColumn<int>)df.Columns["Int"]; 429var longColumn = (PrimitiveDataFrameColumn<long>)df.Columns["Long"]; 430var sbyteColumn = (PrimitiveDataFrameColumn<sbyte>)df.Columns["Sbyte"]; 431var shortColumn = (PrimitiveDataFrameColumn<short>)df.Columns["Short"]; 432var uintColumn = (PrimitiveDataFrameColumn<uint>)df.Columns["Uint"]; 433var ulongColumn = (PrimitiveDataFrameColumn<ulong>)df.Columns["Ulong"]; 434var ushortColumn = (PrimitiveDataFrameColumn<ushort>)df.Columns["Ushort"];
DataFrameTests.cs (120)
55var dc = df.Columns["a1"]; 132DataFrameColumn intColumn_1 = dataFrame.Columns["NewIntColumn"]; 136DataFrameColumn lastColumn_1 = dataFrame.Columns[originalLastColumn.Name]; 231df["Int3"] = df.Columns["Int1"] * 2 + df.Columns["Int2"]; 232Assert.Equal(16, df.Columns["Int3"][2]); 239df.Columns["Int"][0] = 100; 240df.Columns["Int"][19] = -1; 241df.Columns["Int"][5] = 2000; 245Assert.Null(sortedDf.Columns["Int"][19]); 246Assert.Equal(-1, sortedDf.Columns["Int"][0]); 247Assert.Equal(100, sortedDf.Columns["Int"][17]); 248Assert.Equal(2000, sortedDf.Columns["Int"][18]); 252Assert.Null(sortedDf.Columns["Int"][19]); 253Assert.Equal(-1, sortedDf.Columns["Int"][18]); 254Assert.Equal(100, sortedDf.Columns["Int"][1]); 255Assert.Equal(2000, sortedDf.Columns["Int"][0]); 259Assert.Null(sortedDf.Columns["Int"][0]); 260Assert.Equal(-1, sortedDf.Columns["Int"][1]); 261Assert.Equal(100, sortedDf.Columns["Int"][18]); 262Assert.Equal(2000, sortedDf.Columns["Int"][19]); 266Assert.Null(sortedDf.Columns["Int"][0]); 267Assert.Equal(-1, sortedDf.Columns["Int"][19]); 268Assert.Equal(100, sortedDf.Columns["Int"][2]); 269Assert.Equal(2000, sortedDf.Columns["Int"][1]); 273Assert.Null(sortedDf.Columns["Int"][19]); 274Assert.Equal(1, sortedDf.Columns["Int"][1]); 275Assert.Equal(8, sortedDf.Columns["Int"][17]); 276Assert.Equal(9, sortedDf.Columns["Int"][18]); 280Assert.Null(sortedDf.Columns["Int"][19]); 281Assert.Equal(8, sortedDf.Columns["Int"][1]); 282Assert.Equal(9, sortedDf.Columns["Int"][0]); 286Assert.Null(sortedDf.Columns["Int"][0]); 287Assert.Equal(1, sortedDf.Columns["Int"][2]); 288Assert.Equal(8, sortedDf.Columns["Int"][18]); 289Assert.Equal(9, sortedDf.Columns["Int"][19]); 293Assert.Null(sortedDf.Columns["Int"][0]); 294Assert.Equal(8, sortedDf.Columns["Int"][2]); 295Assert.Equal(9, sortedDf.Columns["Int"][1]); 304Assert.Equal((long)5, count.Columns["Int"][0]); 305Assert.Equal((long)4, count.Columns["Decimal"][1]); 321DataFrameColumn firstColumn = first.Columns[originalColumn.Name]; 333DataFrameColumn headColumn = head.Columns[originalColumn.Name]; 342DataFrameColumn headColumn = head.Columns[originalColumn.Name]; 356DataFrameColumn tailColumn = tail.Columns[originalColumn.Name]; 370DataFrameColumn maxColumn = max.Columns[originalColumn.Name]; 393DataFrameColumn minColumn = min.Columns[originalColumn.Name]; 396DataFrameColumn productColumn = product.Columns[originalColumn.Name]; 399DataFrameColumn sumColumn = sum.Columns[originalColumn.Name]; 406Assert.Equal(20, columnSum.Columns["Int"][0]); 407Assert.Equal(20, columnSum.Columns["Int"][1]); 410Assert.Equal(8, columnMax.Columns["Int"][0]); 411Assert.Equal(9, columnMax.Columns["Int"][1]); 414Assert.Equal(0, columnProduct.Columns["Int"][0]); 415Assert.Equal(0, columnProduct.Columns["Int"][1]); 418Assert.Equal(0, columnMin.Columns["Int"][0]); 419Assert.Equal(1, columnMin.Columns["Int"][1]); 424Assert.Equal((long)5, countIntColumn.Columns["Int"][0]); 425Assert.Equal((long)4, countIntColumn.Columns["Int"][1]); 430Assert.Equal((decimal)0, firstDecimalColumn.Columns["Decimal"][0]); 431Assert.Equal((decimal)1, firstDecimalColumn.Columns["Decimal"][1]); 498StringDataFrameColumn stringColumn = (StringDataFrameColumn)df.Columns["String"]; 513ArrowStringDataFrameColumn arrowStringColumn = (ArrowStringDataFrameColumn)df.Columns["ArrowString"]; 528SingleDataFrameColumn floatColumn = (SingleDataFrameColumn)df.Columns["Float"]; 543Int32DataFrameColumn intColumn = (Int32DataFrameColumn)df.Columns["Int"]; 564DataFrameColumn clamped = df.Columns["Int"].Clamp(3, 7); 566Assert.Equal(0, df.Columns["Int"][0]); 568Assert.Equal(1, df.Columns["Int"][1]); 570Assert.Equal(2, df.Columns["Int"][2]); 572Assert.Equal(3, df.Columns["Int"][3]); 574Assert.Equal(4, df.Columns["Int"][4]); 576Assert.Null(df.Columns["Int"][5]); 578Assert.Equal(6, df.Columns["Int"][6]); 580Assert.Equal(7, df.Columns["Int"][7]); 582Assert.Equal(8, df.Columns["Int"][8]); 584Assert.Equal(9, df.Columns["Int"][9]); 587df.Columns["Int"].Clamp(3, 7, true); 588Assert.Equal(3, df.Columns["Int"][0]); 589Assert.Equal(3, df.Columns["Int"][1]); 590Assert.Equal(3, df.Columns["Int"][2]); 591Assert.Equal(3, df.Columns["Int"][3]); 592Assert.Equal(4, df.Columns["Int"][4]); 593Assert.Null(df.Columns["Int"][5]); 594Assert.Equal(6, df.Columns["Int"][6]); 595Assert.Equal(7, df.Columns["Int"][7]); 596Assert.Equal(7, df.Columns["Int"][8]); 597Assert.Equal(7, df.Columns["Int"][9]); 647Assert.Equal(i, df.Columns["Int"][i]); 649Assert.Null(df.Columns["Int"][5]); 713foreach (int? value in sampled.Columns["Int"]) 861DataFrame valueCounts = df.Columns["Bool"].ValueCounts(); 863Assert.Equal((long)5, valueCounts.Columns["Counts"][0]); 864Assert.Equal((long)5, valueCounts.Columns["Counts"][1]); 872Int32DataFrameColumn column = df.Columns["Int1"] as Int32DataFrameColumn; 917Int32DataFrameColumn intColumn = intDf.Columns["Int1"] as Int32DataFrameColumn; 936BooleanDataFrameColumn bigInts = new BooleanDataFrameColumn("BigInts", df.Columns["Int"].ElementwiseGreaterThan(5)); 1132Assert.Equal(15, df.Columns["Column1"].Length); 1133Assert.Equal(15, df.Columns["Column2"].Length); 1139Assert.Equal(16, ret.Columns["Column1"].Length); 1140Assert.Equal(16, ret.Columns["Column2"].Length); 1146Assert.Equal(16, df.Columns["Column1"].Length); 1147Assert.Equal(16, df.Columns["Column2"].Length); 1152Assert.Equal(17, ret.Columns["Column1"].Length); 1153Assert.Equal(17, ret.Columns["Column2"].Length); 1159Assert.Equal(17, df.Columns["Column1"].Length); 1160Assert.Equal(17, df.Columns["Column2"].Length); 1165Assert.Equal(18, ret.Columns["Column1"].Length); 1166Assert.Equal(18, ret.Columns["Column2"].Length); 1177Assert.Equal(18, df.Columns["Column1"].Length); 1178Assert.Equal(18, df.Columns["Column2"].Length); 1184Assert.Equal(18, df.Columns["Column1"].Length); 1185Assert.Equal(18, df.Columns["Column2"].Length); 1189Assert.Equal(19, ret.Columns["Column1"].Length); 1190Assert.Equal(19, ret.Columns["Column2"].Length); 1371Assert.Equal(3, filteredNullDf.Columns["col"].Length); 1373Assert.Equal("One", filteredNullDf.Columns["col"][0]); 1374Assert.Equal("Two", filteredNullDf.Columns["col"][1]); 1375Assert.Equal("Three", filteredNullDf.Columns["col"][2]); 1392Assert.Equal(2, filteredNullDf.Columns["index"][0]); 1393Assert.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)
504Assert.Equal(3, filteredNullDf.Columns["col"].Length); 506Assert.Equal(1.23, filteredNullDf.Columns["col"][0]); 507Assert.Equal(2.0, filteredNullDf.Columns["col"][1]); 508Assert.Equal(3.0, filteredNullDf.Columns["col"][2]); 525Assert.Equal(2, filteredNullDf.Columns["index"][0]); 526Assert.Equal(5, filteredNullDf.Columns["index"][1]);