1 write to DataType
Microsoft.Data.Analysis (1)
DataFrameColumn.cs (1)
31
DataType
= type;
128 references to DataType
Microsoft.Data.Analysis (43)
DataFrame.cs (6)
390
throw new InvalidCastException(String.Format(Strings.BadColumnCastDuringGrouping, columnName, column.
DataType
, typeof(TKey)));
551
if (stringValue.Length == 0 && column.
DataType
!= typeof(string))
562
value = Convert.ChangeType(value, column.
DataType
, cultureInfo);
566
throw new ArgumentException(string.Format(Strings.MismatchedValueType, column.
DataType
), column.Name);
638
value = Convert.ChangeType(value, column.
DataType
, cultureInfo);
641
throw new ArgumentException(string.Format(Strings.MismatchedValueType, column.
DataType
), column.Name);
DataFrame.IO.cs (2)
150
table.Columns.Add(column.Name, column.
DataType
);
159
if (table.Columns[c].DataType != Columns[c].
DataType
)
DataFrameColumn.cs (5)
274
if (this.
DataType
!= other.
DataType
)
275
throw new ArgumentException(String.Format(Strings.MismatchedColumnValueType, this.
DataType
), nameof(other));
418
dataColumn[0] =
DataType
.ToString();
453
sb.Append($"Name: {Name}, Type: {
DataType
}");
DataFrameColumnCollection.cs (18)
223
throw new ArgumentException(string.Format(Strings.BadColumnCast, column.
DataType
, typeof(T)), nameof(T));
240
throw new ArgumentException(string.Format(Strings.BadColumnCast, column.
DataType
, typeof(DateTime)));
257
throw new ArgumentException(string.Format(Strings.BadColumnCast, column.
DataType
, typeof(string)));
274
throw new ArgumentException(string.Format(Strings.BadColumnCast, column.
DataType
, typeof(string)));
291
throw 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.
308
throw new ArgumentException(string.Format(Strings.BadColumnCast, column.
DataType
, typeof(Byte)));
325
throw new ArgumentException(string.Format(Strings.BadColumnCast, column.
DataType
, typeof(Char)));
342
throw new ArgumentException(string.Format(Strings.BadColumnCast, column.
DataType
, typeof(Double)));
359
throw new ArgumentException(string.Format(Strings.BadColumnCast, column.
DataType
, typeof(Decimal)));
376
throw new ArgumentException(string.Format(Strings.BadColumnCast, column.
DataType
, typeof(Single)));
393
throw new ArgumentException(string.Format(Strings.BadColumnCast, column.
DataType
, typeof(Int32)));
410
throw new ArgumentException(string.Format(Strings.BadColumnCast, column.
DataType
, typeof(Int64)));
427
throw new ArgumentException(string.Format(Strings.BadColumnCast, column.
DataType
, typeof(SByte)));
444
throw new ArgumentException(string.Format(Strings.BadColumnCast, column.
DataType
, typeof(Int16)));
461
throw new ArgumentException(string.Format(Strings.BadColumnCast, column.
DataType
, typeof(string)));
478
throw new ArgumentException(string.Format(Strings.BadColumnCast, column.
DataType
, typeof(UInt64)));
495
throw new ArgumentException(string.Format(Strings.BadColumnCast, column.
DataType
, typeof(UInt16)));
DataFrameColumns\ArrowStringDataFrameColumn.cs (2)
398
Type dataType = mapIndices.
DataType
;
401
if (mapIndices.
DataType
== typeof(long))
DataFrameColumns\StringDataFrameColumn.cs (2)
305
Type dataType = mapIndices.
DataType
;
308
if (mapIndices.
DataType
== typeof(long))
DataFrameColumns\VBufferDataFrameColumn.cs (2)
285
Type dataType = mapIndices.
DataType
;
288
if (mapIndices.
DataType
== typeof(long))
PrimitiveDataFrameColumn.cs (6)
142
if (this.
DataType
== typeof(DateTime))
168
Type type = this.
DataType
;
245
throw new ArgumentException(string.Format(Strings.MismatchedValueType,
DataType
), nameof(value));
428
Type dataType = mapIndices.
DataType
;
482
if (mapIndices.
DataType
== typeof(long))
486
else if (mapIndices.
DataType
== typeof(int))
Microsoft.Data.Analysis.Tests (85)
DataFrame.IOTests.cs (44)
35
Type dataType = column.
DataType
;
346
Assert.True(typeof(string) == df.Columns[0].
DataType
);
347
Assert.True(typeof(short) == df.Columns[1].
DataType
);
348
Assert.True(typeof(int) == df.Columns[2].
DataType
);
349
Assert.True(typeof(long) == df.Columns[3].
DataType
);
350
Assert.True(typeof(float) == df.Columns[4].
DataType
);
351
Assert.True(typeof(string) == df.Columns[5].
DataType
);
352
Assert.True(typeof(double) == df.Columns[6].
DataType
);
457
Assert.True(typeof(string) == df.Columns[0].
DataType
);
458
Assert.True(typeof(short) == df.Columns[1].
DataType
);
459
Assert.True(typeof(int) == df.Columns[2].
DataType
);
460
Assert.True(typeof(long) == df.Columns[3].
DataType
);
461
Assert.True(typeof(float) == df.Columns[4].
DataType
);
462
Assert.True(typeof(string) == df.Columns[5].
DataType
);
463
Assert.True(typeof(double) == df.Columns[6].
DataType
);
476
if (column.
DataType
!= typeof(string))
518
Assert.True(typeof(string) == df.Columns[0].
DataType
);
519
Assert.True(typeof(short) == df.Columns[1].
DataType
);
520
Assert.True(typeof(int) == df.Columns[2].
DataType
);
521
Assert.True(typeof(long) == df.Columns[3].
DataType
);
522
Assert.True(typeof(float) == df.Columns[4].
DataType
);
523
Assert.True(typeof(string) == df.Columns[5].
DataType
);
524
Assert.True(typeof(double) == df.Columns[6].
DataType
);
525
Assert.True(typeof(DateTime) == df.Columns[7].
DataType
);
540
if (column.
DataType
!= typeof(string))
800
Assert.True(typeof(string) == df.Columns[0].
DataType
);
801
Assert.True(typeof(string) == df.Columns[1].
DataType
);
802
Assert.True(typeof(string) == df.Columns[2].
DataType
);
803
Assert.True(typeof(string) == df.Columns[3].
DataType
);
843
Assert.True(typeof(string) == df.Columns[0].
DataType
);
844
Assert.True(typeof(short) == df.Columns[1].
DataType
);
845
Assert.True(typeof(int) == df.Columns[2].
DataType
);
846
Assert.True(typeof(long) == df.Columns[3].
DataType
);
856
if (column.
DataType
!= typeof(string))
905
Assert.True(typeof(string) == df.Columns[0].
DataType
);
906
Assert.True(typeof(float) == df.Columns[1].
DataType
);
907
Assert.True(typeof(float) == df.Columns[2].
DataType
);
908
Assert.True(typeof(float) == df.Columns[3].
DataType
);
918
if (column.
DataType
!= typeof(string))
974
Assert.Equal(typeof(string), readIn.Columns[0].
DataType
);
1150
Assert.True(typeof(string) == df.Columns[0].
DataType
);
1151
Assert.True(typeof(string) == df.Columns[1].
DataType
);
1228
var resColumns = dataFrame.Columns.Select(column => (column.Name, column.
DataType
)).ToArray();
1313
Assert.True(_columnTypes[j] == df.Columns[j].
DataType
);
DataFrameTests.BinaryOperations.cs (12)
153
var dtype = dfd.Columns[0].
DataType
;
158
dtype = dfm.Columns[0].
DataType
;
369
Assert.True(typeof(decimal) == tempDf.Columns["Int"].
DataType
);
375
Assert.True(typeof(decimal) == tempDf.Columns["Int"].
DataType
);
381
Assert.True(typeof(decimal) == tempDf.Columns["Int"].
DataType
);
387
Assert.True(typeof(decimal) == tempDf.Columns["Int"].
DataType
);
393
Assert.True(typeof(decimal) == tempDf.Columns["Int"].
DataType
);
401
Assert.True(typeof(decimal) == tempDf.Columns["Int"].
DataType
);
407
Assert.True(typeof(decimal) == tempDf.Columns["Int"].
DataType
);
413
Assert.True(typeof(decimal) == tempDf.Columns["Int"].
DataType
);
422
Assert.True(typeof(decimal) == tempDf.Columns["Int"].
DataType
);
428
Assert.True(typeof(decimal) == tempDf.Columns["Int"].
DataType
);
DataFrameTests.Computations.cs (6)
131
if (column.
DataType
== typeof(bool))
143
else if (column.
DataType
== typeof(string))
155
else if (column.
DataType
== typeof(DateTime))
300
if (column.
DataType
== typeof(bool))
312
else if (column.
DataType
== typeof(string))
324
else if (column.
DataType
== typeof(DateTime))
DataFrameTests.cs (3)
778
Assert.Equal(df.Columns[i - 1].
DataType
.ToString(), column[0].ToString());
1002
row[i] = Convert.ChangeType(12, column.
DataType
);
1243
Assert.Equal(column.
DataType
, type);
PrimitiveDataFrameColumnTests.cs (20)
268
Assert.Equal(intColumn.
DataType
, copy.
DataType
);
287
Assert.Equal(column.
DataType
, clonedColumn.
DataType
);
307
Assert.Equal(column.
DataType
, clonedColumn.
DataType
);
329
Assert.Equal(column.
DataType
, clonedColumn.
DataType
);
350
Assert.Equal(column.
DataType
, clonedColumn.
DataType
);
371
Assert.Equal(column.
DataType
, clonedColumn.
DataType
);
392
Assert.Equal(column.
DataType
, clonedColumn.
DataType
);
413
Assert.Equal(column.
DataType
, clonedColumn.
DataType
);
434
Assert.Equal(column.
DataType
, clonedColumn.
DataType
);
456
Assert.Equal(column.
DataType
, clonedColumn.
DataType
);