1 write to DataType
Microsoft.Data.Analysis (1)
DataFrameColumn.cs (1)
31DataType = type;
129 references to DataType
Microsoft.Data.Analysis (44)
DataFrame.cs (7)
423throw new InvalidCastException(String.Format(Strings.BadColumnCastDuringGrouping, columnName, column.DataType, typeof(TKey))); 584if (stringValue.Length == 0 && column.DataType != typeof(string)) 595value = Convert.ChangeType(value, column.DataType, cultureInfo); 599throw new ArgumentException(string.Format(Strings.MismatchedValueType, column.DataType), column.Name); 671value = Convert.ChangeType(value, column.DataType, cultureInfo); 674throw new ArgumentException(string.Format(Strings.MismatchedValueType, column.DataType), column.Name); 913.Select(name => _columnCollection[name].DataType)
DataFrame.IO.cs (2)
153table.Columns.Add(column.Name, column.DataType); 162if (table.Columns[c].DataType != Columns[c].DataType)
DataFrameColumn.cs (5)
282if (this.DataType != other.DataType) 283throw new ArgumentException(String.Format(Strings.MismatchedColumnValueType, this.DataType), nameof(other)); 426dataColumn[0] = DataType.ToString(); 461sb.Append($"Name: {Name}, Type: {DataType}");
DataFrameColumnCollection.cs (18)
223throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(T)), nameof(T)); 240throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(DateTime))); 257throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(string))); 274throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(string))); 291throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Boolean))); 295/// Gets the <see cref="ByteDataFrameColumn"/> with the specified <paramref name="name"/> and attempts to return it as an <see cref="ByteDataFrameColumn"/>. If <see cref="DataFrameColumn.DataType"/> is not of type <see cref="Byte"/>, an exception is thrown. 308throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Byte))); 325throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Char))); 342throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Double))); 359throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Decimal))); 376throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Single))); 393throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Int32))); 410throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Int64))); 427throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(SByte))); 444throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Int16))); 461throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(string))); 478throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(UInt64))); 495throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(UInt16)));
DataFrameColumns\ArrowStringDataFrameColumn.cs (2)
400Type dataType = mapIndices.DataType; 403if (mapIndices.DataType == typeof(long))
DataFrameColumns\StringDataFrameColumn.cs (2)
307Type dataType = mapIndices.DataType; 310if (mapIndices.DataType == typeof(long))
DataFrameColumns\VBufferDataFrameColumn.cs (2)
287Type dataType = mapIndices.DataType; 290if (mapIndices.DataType == typeof(long))
PrimitiveDataFrameColumn.cs (6)
142if (this.DataType == typeof(DateTime)) 168Type type = this.DataType; 245throw new ArgumentException(string.Format(Strings.MismatchedValueType, DataType), nameof(value)); 436Type dataType = mapIndices.DataType; 490if (mapIndices.DataType == typeof(long)) 494else if (mapIndices.DataType == typeof(int))
Microsoft.Data.Analysis.Tests (85)
DataFrame.IOTests.cs (44)
36Type dataType = column.DataType; 347Assert.True(typeof(string) == df.Columns[0].DataType); 348Assert.True(typeof(short) == df.Columns[1].DataType); 349Assert.True(typeof(int) == df.Columns[2].DataType); 350Assert.True(typeof(long) == df.Columns[3].DataType); 351Assert.True(typeof(float) == df.Columns[4].DataType); 352Assert.True(typeof(string) == df.Columns[5].DataType); 353Assert.True(typeof(double) == df.Columns[6].DataType); 458Assert.True(typeof(string) == df.Columns[0].DataType); 459Assert.True(typeof(short) == df.Columns[1].DataType); 460Assert.True(typeof(int) == df.Columns[2].DataType); 461Assert.True(typeof(long) == df.Columns[3].DataType); 462Assert.True(typeof(float) == df.Columns[4].DataType); 463Assert.True(typeof(string) == df.Columns[5].DataType); 464Assert.True(typeof(double) == df.Columns[6].DataType); 477if (column.DataType != typeof(string)) 519Assert.True(typeof(string) == df.Columns[0].DataType); 520Assert.True(typeof(short) == df.Columns[1].DataType); 521Assert.True(typeof(int) == df.Columns[2].DataType); 522Assert.True(typeof(long) == df.Columns[3].DataType); 523Assert.True(typeof(float) == df.Columns[4].DataType); 524Assert.True(typeof(string) == df.Columns[5].DataType); 525Assert.True(typeof(double) == df.Columns[6].DataType); 526Assert.True(typeof(DateTime) == df.Columns[7].DataType); 541if (column.DataType != typeof(string)) 801Assert.True(typeof(string) == df.Columns[0].DataType); 802Assert.True(typeof(string) == df.Columns[1].DataType); 803Assert.True(typeof(string) == df.Columns[2].DataType); 804Assert.True(typeof(string) == df.Columns[3].DataType); 844Assert.True(typeof(string) == df.Columns[0].DataType); 845Assert.True(typeof(short) == df.Columns[1].DataType); 846Assert.True(typeof(int) == df.Columns[2].DataType); 847Assert.True(typeof(long) == df.Columns[3].DataType); 857if (column.DataType != typeof(string)) 906Assert.True(typeof(string) == df.Columns[0].DataType); 907Assert.True(typeof(float) == df.Columns[1].DataType); 908Assert.True(typeof(float) == df.Columns[2].DataType); 909Assert.True(typeof(float) == df.Columns[3].DataType); 919if (column.DataType != typeof(string)) 975Assert.Equal(typeof(string), readIn.Columns[0].DataType); 1207Assert.True(typeof(string) == df.Columns[0].DataType); 1208Assert.True(typeof(string) == df.Columns[1].DataType); 1285var resColumns = dataFrame.Columns.Select(column => (column.Name, column.DataType)).ToArray(); 1370Assert.True(_columnTypes[j] == df.Columns[j].DataType);
DataFrameTests.BinaryOperations.cs (12)
209var dtype = dfd.Columns[0].DataType; 214dtype = dfm.Columns[0].DataType; 425Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); 431Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); 437Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); 443Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); 449Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); 457Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); 463Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); 469Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); 478Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); 484Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType);
DataFrameTests.Computations.cs (6)
131if (column.DataType == typeof(bool)) 143else if (column.DataType == typeof(string)) 155else if (column.DataType == typeof(DateTime)) 300if (column.DataType == typeof(bool)) 312else if (column.DataType == typeof(string)) 324else if (column.DataType == typeof(DateTime))
DataFrameTests.cs (3)
778Assert.Equal(df.Columns[i - 1].DataType.ToString(), column[0].ToString()); 1002row[i] = Convert.ChangeType(12, column.DataType); 1243Assert.Equal(column.DataType, type);
PrimitiveDataFrameColumnTests.cs (20)
305Assert.Equal(intColumn.DataType, copy.DataType); 324Assert.Equal(column.DataType, clonedColumn.DataType); 344Assert.Equal(column.DataType, clonedColumn.DataType); 366Assert.Equal(column.DataType, clonedColumn.DataType); 387Assert.Equal(column.DataType, clonedColumn.DataType); 408Assert.Equal(column.DataType, clonedColumn.DataType); 429Assert.Equal(column.DataType, clonedColumn.DataType); 450Assert.Equal(column.DataType, clonedColumn.DataType); 471Assert.Equal(column.DataType, clonedColumn.DataType); 493Assert.Equal(column.DataType, clonedColumn.DataType);