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)
29
Type dataType = column.
DataType
;
340
Assert.True(typeof(string) == df.Columns[0].
DataType
);
341
Assert.True(typeof(short) == df.Columns[1].
DataType
);
342
Assert.True(typeof(int) == df.Columns[2].
DataType
);
343
Assert.True(typeof(long) == df.Columns[3].
DataType
);
344
Assert.True(typeof(float) == df.Columns[4].
DataType
);
345
Assert.True(typeof(string) == df.Columns[5].
DataType
);
346
Assert.True(typeof(double) == df.Columns[6].
DataType
);
451
Assert.True(typeof(string) == df.Columns[0].
DataType
);
452
Assert.True(typeof(short) == df.Columns[1].
DataType
);
453
Assert.True(typeof(int) == df.Columns[2].
DataType
);
454
Assert.True(typeof(long) == df.Columns[3].
DataType
);
455
Assert.True(typeof(float) == df.Columns[4].
DataType
);
456
Assert.True(typeof(string) == df.Columns[5].
DataType
);
457
Assert.True(typeof(double) == df.Columns[6].
DataType
);
470
if (column.
DataType
!= typeof(string))
512
Assert.True(typeof(string) == df.Columns[0].
DataType
);
513
Assert.True(typeof(short) == df.Columns[1].
DataType
);
514
Assert.True(typeof(int) == df.Columns[2].
DataType
);
515
Assert.True(typeof(long) == df.Columns[3].
DataType
);
516
Assert.True(typeof(float) == df.Columns[4].
DataType
);
517
Assert.True(typeof(string) == df.Columns[5].
DataType
);
518
Assert.True(typeof(double) == df.Columns[6].
DataType
);
519
Assert.True(typeof(DateTime) == df.Columns[7].
DataType
);
534
if (column.
DataType
!= typeof(string))
794
Assert.True(typeof(string) == df.Columns[0].
DataType
);
795
Assert.True(typeof(string) == df.Columns[1].
DataType
);
796
Assert.True(typeof(string) == df.Columns[2].
DataType
);
797
Assert.True(typeof(string) == df.Columns[3].
DataType
);
837
Assert.True(typeof(string) == df.Columns[0].
DataType
);
838
Assert.True(typeof(short) == df.Columns[1].
DataType
);
839
Assert.True(typeof(int) == df.Columns[2].
DataType
);
840
Assert.True(typeof(long) == df.Columns[3].
DataType
);
850
if (column.
DataType
!= typeof(string))
899
Assert.True(typeof(string) == df.Columns[0].
DataType
);
900
Assert.True(typeof(float) == df.Columns[1].
DataType
);
901
Assert.True(typeof(float) == df.Columns[2].
DataType
);
902
Assert.True(typeof(float) == df.Columns[3].
DataType
);
912
if (column.
DataType
!= typeof(string))
968
Assert.Equal(typeof(string), readIn.Columns[0].
DataType
);
1144
Assert.True(typeof(string) == df.Columns[0].
DataType
);
1145
Assert.True(typeof(string) == df.Columns[1].
DataType
);
1222
var resColumns = dataFrame.Columns.Select(column => (column.Name, column.
DataType
)).ToArray();
1307
Assert.True(_columnTypes[j] == df.Columns[j].
DataType
);
DataFrameTests.BinaryOperations.cs (12)
147
var dtype = dfd.Columns[0].
DataType
;
152
dtype = dfm.Columns[0].
DataType
;
363
Assert.True(typeof(decimal) == tempDf.Columns["Int"].
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
);
395
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
);
416
Assert.True(typeof(decimal) == tempDf.Columns["Int"].
DataType
);
422
Assert.True(typeof(decimal) == tempDf.Columns["Int"].
DataType
);
DataFrameTests.Computations.cs (6)
129
if (column.
DataType
== typeof(bool))
141
else if (column.
DataType
== typeof(string))
153
else if (column.
DataType
== typeof(DateTime))
298
if (column.
DataType
== typeof(bool))
310
else if (column.
DataType
== typeof(string))
322
else if (column.
DataType
== typeof(DateTime))
DataFrameTests.cs (3)
776
Assert.Equal(df.Columns[i - 1].
DataType
.ToString(), column[0].ToString());
1000
row[i] = Convert.ChangeType(12, column.
DataType
);
1241
Assert.Equal(column.
DataType
, type);
PrimitiveDataFrameColumnTests.cs (20)
262
Assert.Equal(intColumn.
DataType
, copy.
DataType
);
281
Assert.Equal(column.
DataType
, clonedColumn.
DataType
);
301
Assert.Equal(column.
DataType
, clonedColumn.
DataType
);
323
Assert.Equal(column.
DataType
, clonedColumn.
DataType
);
344
Assert.Equal(column.
DataType
, clonedColumn.
DataType
);
365
Assert.Equal(column.
DataType
, clonedColumn.
DataType
);
386
Assert.Equal(column.
DataType
, clonedColumn.
DataType
);
407
Assert.Equal(column.
DataType
, clonedColumn.
DataType
);
428
Assert.Equal(column.
DataType
, clonedColumn.
DataType
);
450
Assert.Equal(column.
DataType
, clonedColumn.
DataType
);